2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-13 08:21:26 +00:00

Set allow_null flag on image fields

This commit is contained in:
Oliver
2021-06-23 11:40:37 +10:00
parent 5ba7aeaa27
commit 36e6b9f164
3 changed files with 9 additions and 4 deletions

View File

@ -50,10 +50,15 @@ class CompanyTest(InvenTreeAPITestCase):
self.assertEqual(response.data['name'], 'ACME')
# Change the name of the company
# Note we should not have the correct permissions (yet)
data = response.data
data['name'] = 'ACMOO'
response = self.client.patch(url, data, format='json')
self.assertEqual(response.status_code, status.HTTP_200_OK)
response = self.client.patch(url, data, format='json', expected_code=400)
self.assignRole('company.change')
response = self.client.patch(url, data, format='json', expected_code=200)
self.assertEqual(response.data['name'], 'ACMOO')
def test_company_search(self):