mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-23 16:32:15 +00:00
Fixed Pep8 - I promise I'll make a pre-commit hook sometime!
This commit is contained in:
@@ -17,6 +17,7 @@ from PyRIGS.tests.base import animation_is_finished
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestAssetList(AutoLoginTest):
|
||||
def setUp(self):
|
||||
@@ -40,7 +41,6 @@ class TestAssetList(AutoLoginTest):
|
||||
self.assertIn("A light", assetDescriptions)
|
||||
self.assertIn("Working Mic", assetDescriptions)
|
||||
|
||||
|
||||
def test_asset_order(self):
|
||||
# Only the working stuff should be shown initially
|
||||
self.page.status_selector.open()
|
||||
@@ -95,6 +95,7 @@ class TestAssetList(AutoLoginTest):
|
||||
self.assertEqual("1", assetIDs[0])
|
||||
self.assertEqual("10", assetIDs[1])
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestAssetForm(AutoLoginTest):
|
||||
def setUp(self):
|
||||
@@ -202,6 +203,7 @@ class TestAssetForm(AutoLoginTest):
|
||||
self.assertTrue(self.page.success)
|
||||
self.assertEqual(models.Asset.objects.last().description, self.parent.description)
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestSupplierList(AutoLoginTest):
|
||||
def setUp(self):
|
||||
@@ -241,6 +243,7 @@ class TestSupplierList(AutoLoginTest):
|
||||
self.page.search()
|
||||
self.assertTrue(len(self.page.suppliers) == 0)
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestSupplierCreateAndEdit(AutoLoginTest):
|
||||
def setUp(self):
|
||||
@@ -268,6 +271,7 @@ class TestSupplierCreateAndEdit(AutoLoginTest):
|
||||
self.page.submit()
|
||||
self.assertTrue(self.page.success)
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestAssetAudit(AutoLoginTest):
|
||||
def setUp(self):
|
||||
@@ -338,6 +342,7 @@ class TestAssetAudit(AutoLoginTest):
|
||||
self.assertFalse(self.driver.find_element_by_id('modal').is_displayed())
|
||||
self.assertIn("Asset with that ID does not exist!", self.page.error.text)
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestSupplierValidation(TestCase):
|
||||
@classmethod
|
||||
@@ -360,6 +365,7 @@ class TestSupplierValidation(TestCase):
|
||||
response = self.client.post(url, {'name': ""})
|
||||
self.assertFormError(response, 'form', 'name', 'This field is required.')
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class Test404(TestCase):
|
||||
@classmethod
|
||||
@@ -450,6 +456,7 @@ class TestAccessLevels(TestCase):
|
||||
|
||||
# def test_finance_access(self): Level not used in assets currently
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestFormValidation(TestCase):
|
||||
@classmethod
|
||||
@@ -518,6 +525,7 @@ class TestFormValidation(TestCase):
|
||||
self.assertFormError(response, 'form', 'length', 'The length of a cable must be more than 0')
|
||||
self.assertFormError(response, 'form', 'csa', 'The CSA of a cable must be more than 0')
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestSampleDataGenerator(TestCase):
|
||||
@override_settings(DEBUG=True)
|
||||
@@ -542,6 +550,7 @@ class TestSampleDataGenerator(TestCase):
|
||||
self.assertRaisesRegex(CommandError, ".*production", call_command, 'generateSampleAssetsData')
|
||||
self.assertRaisesRegex(CommandError, ".*production", call_command, 'deleteSampleData')
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestVersioningViews(TestCase):
|
||||
@classmethod
|
||||
@@ -585,6 +594,7 @@ class TestVersioningViews(TestCase):
|
||||
response = self.client.get(request_url, follow=True)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
@screenshot_failure_cls
|
||||
class TestEmbeddedViews(TestCase):
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user