move test
This commit is contained in:
parent
e8ff45b143
commit
d2fc514ba7
|
|
@ -111,20 +111,6 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
|
|||
).data
|
||||
self.assertEqual(data['success'], 'Installed plugin successfully')
|
||||
|
||||
# valid - python repository url and package name
|
||||
data = self.post(
|
||||
url,
|
||||
{
|
||||
'confirm': True,
|
||||
'url': 'https://git.invenhost.com/api/packages/invenhost-c1/pypi/simple/',
|
||||
'packagename': 'inventree-approval',
|
||||
},
|
||||
expected_code=201,
|
||||
max_query_count=450,
|
||||
max_query_time=30,
|
||||
).data
|
||||
self.assertEqual(data['success'], 'Installed plugin successfully')
|
||||
|
||||
# valid (kindoff) - Pypi and onsense uri
|
||||
data = self.post(
|
||||
url,
|
||||
|
|
@ -691,3 +677,27 @@ class PluginFullAPITest(PluginMixin, InvenTreeAPITestCase):
|
|||
# Successful uninstallation
|
||||
with self.assertRaises(PluginConfig.DoesNotExist):
|
||||
PluginConfig.objects.get(key=slug)
|
||||
|
||||
def test_registry(self):
|
||||
"""Test install with a custom registry."""
|
||||
# install - python repository url and package name
|
||||
data = self.post(
|
||||
reverse('api-plugin-install'),
|
||||
{
|
||||
'confirm': True,
|
||||
'url': 'https://git.invenhost.com/api/packages/invenhost-c1/pypi/simple/',
|
||||
'packagename': 'inventree-approval',
|
||||
},
|
||||
expected_code=201,
|
||||
max_query_count=450,
|
||||
max_query_time=30,
|
||||
).data
|
||||
self.assertEqual(data['success'], 'Installed plugin successfully')
|
||||
|
||||
# and uninstall it again to clean up
|
||||
response = self.patch(
|
||||
reverse('api-plugin-uninstall', kwargs={'plugin': 'inventree-approval'}),
|
||||
data={'delete_config': True},
|
||||
max_query_count=350,
|
||||
)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
|
|
|||
Loading…
Reference in New Issue