disable uninstall in test

This commit is contained in:
Matthias Mair 2026-04-04 17:07:29 +02:00
parent d2fc514ba7
commit 217dbcb9ba
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
1 changed files with 11 additions and 8 deletions

View File

@ -678,15 +678,18 @@ class PluginFullAPITest(PluginMixin, InvenTreeAPITestCase):
with self.assertRaises(PluginConfig.DoesNotExist):
PluginConfig.objects.get(key=slug)
@override_settings(PLUGIN_TESTING_SETUP=True)
def test_registry(self):
"""Test install with a custom registry."""
plrg_name = 'inventree-approval'
# 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',
'packagename': plrg_name,
},
expected_code=201,
max_query_count=450,
@ -694,10 +697,10 @@ class PluginFullAPITest(PluginMixin, InvenTreeAPITestCase):
).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)
# # and uninstall it again to clean up
# response = self.patch(
# reverse('api-plugin-uninstall', kwargs={'plugin': plrg_name}),
# data={'delete_config': True},
# max_query_count=350,
# )
# self.assertEqual(response.status_code, 200)