mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
More unit test fixes
This commit is contained in:
parent
7505d7b3c5
commit
0cc999410b
@ -446,6 +446,13 @@ class PartDetailTests(InvenTreeAPITestCase):
|
||||
# Try to remove the part
|
||||
response = self.client.delete(url)
|
||||
|
||||
# As the part is 'active' we cannot delete it
|
||||
self.assertEqual(response.status_code, 405)
|
||||
|
||||
# So, let's make it not active
|
||||
response = self.patch(url, {'active': False}, expected_code=200)
|
||||
|
||||
response = self.client.delete(url)
|
||||
self.assertEqual(response.status_code, 204)
|
||||
|
||||
# Part count should have reduced
|
||||
|
Loading…
Reference in New Issue
Block a user