Skip to content

Commit

Permalink
[qa] Minor flake8 fix in test_controller
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Apr 23, 2019
1 parent 69e15f1 commit acfee71
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions openwisp_controller/config/tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ def test_register_403_disabled_org(self):
def test_checksum_404_disabled_org(self):
org = self._create_org(is_active=False)
c = self._create_config(organization=org)
response = self.client.get(reverse('controller:device_checksum', args=[c.device.pk]), {'key': c.device.key})
response = self.client.get(reverse('controller:device_checksum',
args=[c.device.pk]),
{'key': c.device.key})
self.assertEqual(response.status_code, 404)

def test_download_config_404_disabled_org(self):
Expand All @@ -125,14 +127,17 @@ def test_download_config_404_disabled_org(self):
def test_report_status_404_disabled_org(self):
org = self._create_org(is_active=False)
c = self._create_config(organization=org)
response = self.client.post(reverse('controller:device_report_status', args=[c.device.pk]),
response = self.client.post(reverse('controller:device_report_status',
args=[c.device.pk]),
{'key': c.device.key, 'status': 'applied'})
self.assertEqual(response.status_code, 404)

def test_checksum_200(self):
org = self._create_org()
c = self._create_config(organization=org)
response = self.client.get(reverse('controller:device_checksum', args=[c.device.pk]), {'key': c.device.key})
response = self.client.get(reverse('controller:device_checksum',
args=[c.device.pk]),
{'key': c.device.key})
self.assertEqual(response.status_code, 200)


Expand Down

0 comments on commit acfee71

Please sign in to comment.