mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
remove dead code
This commit is contained in:
parent
491bb0b28f
commit
c0ab93b2a9
@ -49,28 +49,6 @@ class CompanyViewTestBase(TestCase):
|
|||||||
|
|
||||||
self.client.login(username='username', password='password')
|
self.client.login(username='username', password='password')
|
||||||
|
|
||||||
def post(self, url, data, valid=None):
|
|
||||||
"""
|
|
||||||
POST against this form and return the response (as a JSON object)
|
|
||||||
"""
|
|
||||||
|
|
||||||
response = self.client.post(url, data, HTTP_X_REQUESTED_WITH='XMLHttpRequest')
|
|
||||||
|
|
||||||
self.assertEqual(response.status_code, 200)
|
|
||||||
|
|
||||||
json_data = json.loads(response.content)
|
|
||||||
|
|
||||||
# If a particular status code is required
|
|
||||||
if valid is not None:
|
|
||||||
if valid:
|
|
||||||
self.assertEqual(json_data['form_valid'], True)
|
|
||||||
else:
|
|
||||||
self.assertEqual(json_data['form_valid'], False)
|
|
||||||
|
|
||||||
form_errors = json.loads(json_data['form_errors'])
|
|
||||||
|
|
||||||
return json_data, form_errors
|
|
||||||
|
|
||||||
|
|
||||||
class CompanyViewTest(CompanyViewTestBase):
|
class CompanyViewTest(CompanyViewTestBase):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user