diff options
author | 2018-09-04 22:06:07 +0200 | |
---|---|---|
committer | 2018-09-04 22:06:07 +0200 | |
commit | e211cbf6dbbe3a28ef1276af69c4f387db52d596 (patch) | |
tree | 8bb441e8528056806e129c5d45b3770bbaa0fd31 /api/tests | |
parent | Add job tags. (diff) |
Set up GitLab CI properly.
Diffstat (limited to 'api/tests')
-rw-r--r-- | api/tests/base.py | 5 | ||||
-rw-r--r-- | api/tests/test_documentation_links.py | 4 | ||||
-rw-r--r-- | api/tests/test_members.py | 3 | ||||
-rw-r--r-- | api/tests/test_off_topic_channel_names.py | 4 | ||||
-rw-r--r-- | api/tests/test_snake_names.py | 3 |
5 files changed, 8 insertions, 11 deletions
diff --git a/api/tests/base.py b/api/tests/base.py index 06f7233c..395dc55c 100644 --- a/api/tests/base.py +++ b/api/tests/base.py @@ -1,12 +1,11 @@ from django.contrib.auth.models import User -from rest_framework.authtoken.models import Token -from rest_framework.test import APIClient, APITestCase +from rest_framework.test import APITestCase test_user, _created = User.objects.get_or_create( username='test', email='[email protected]', - password='testpass', + password='testpass', # flake8: noqa - S106 is_superuser=True, is_staff=True ) diff --git a/api/tests/test_documentation_links.py b/api/tests/test_documentation_links.py index e560a2fd..f6c78391 100644 --- a/api/tests/test_documentation_links.py +++ b/api/tests/test_documentation_links.py @@ -57,7 +57,7 @@ class EmptyDatabaseDocumentationLinkAPITests(APISubdomainTestCase): class DetailLookupDocumentationLinkAPITests(APISubdomainTestCase): @classmethod - def setUpTestData(cls): + def setUpTestData(cls): # noqa cls.doc_link = DocumentationLink.objects.create( package='testpackage', base_url='https://example.com', @@ -141,7 +141,7 @@ class DocumentationLinkCreationTests(APISubdomainTestCase): class DocumentationLinkDeletionTests(APISubdomainTestCase): @classmethod - def setUpTestData(cls): + def setUpTestData(cls): # noqa cls.doc_link = DocumentationLink.objects.create( package='example', base_url='https://example.com', diff --git a/api/tests/test_members.py b/api/tests/test_members.py index 60ad8460..47466b62 100644 --- a/api/tests/test_members.py +++ b/api/tests/test_members.py @@ -1,4 +1,3 @@ -from django.test import TestCase from django_hosts.resolvers import reverse from .base import APISubdomainTestCase @@ -37,7 +36,7 @@ class UnauthedDocumentationLinkAPITests(APISubdomainTestCase): class CreationTests(APISubdomainTestCase): @classmethod - def setUpTestData(cls): + def setUpTestData(cls): # noqa cls.role = Role.objects.create( id=5, name="Test role pls ignore", diff --git a/api/tests/test_off_topic_channel_names.py b/api/tests/test_off_topic_channel_names.py index 1b222dca..60af1f62 100644 --- a/api/tests/test_off_topic_channel_names.py +++ b/api/tests/test_off_topic_channel_names.py @@ -58,7 +58,7 @@ class EmptyDatabaseTests(APISubdomainTestCase): class ListTests(APISubdomainTestCase): @classmethod - def setUpTestData(cls): + def setUpTestData(cls): # noqa cls.test_name = OffTopicChannelName.objects.create(name='lemons-lemonade-stand') cls.test_name_2 = OffTopicChannelName.objects.create(name='bbq-with-bisk') @@ -125,7 +125,7 @@ class CreationTests(APISubdomainTestCase): class DeletionTests(APISubdomainTestCase): @classmethod - def setUpTestData(cls): + def setUpTestData(cls): # noqa cls.test_name = OffTopicChannelName.objects.create(name='lemons-lemonade-stand') cls.test_name_2 = OffTopicChannelName.objects.create(name='bbq-with-bisk') diff --git a/api/tests/test_snake_names.py b/api/tests/test_snake_names.py index 6a669557..41dfae63 100644 --- a/api/tests/test_snake_names.py +++ b/api/tests/test_snake_names.py @@ -4,7 +4,6 @@ from .base import APISubdomainTestCase from ..models import SnakeName - class StatusTests(APISubdomainTestCase): def setUp(self): super().setUp() @@ -41,7 +40,7 @@ class EmptyDatabaseSnakeNameTests(APISubdomainTestCase): class SnakeNameListTests(APISubdomainTestCase): @classmethod - def setUpTestData(cls): + def setUpTestData(cls): # noqa cls.snake_python = SnakeName.objects.create(name='Python', scientific='Totally.') def test_endpoint_returns_all_snakes_with_get_all_param(self): |