diff --git a/django_expanded_test_cases/test_cases/universal_live_server_test_case.py b/django_expanded_test_cases/mixins/live_server_mixin.py similarity index 99% rename from django_expanded_test_cases/test_cases/universal_live_server_test_case.py rename to django_expanded_test_cases/mixins/live_server_mixin.py index a1a9ce9c1d8abfbb4b36224869f2444cd453585a..67039883c2d3f9b0c6fe9fe3b8b07fba96c4792b 100644 --- a/django_expanded_test_cases/test_cases/universal_live_server_test_case.py +++ b/django_expanded_test_cases/mixins/live_server_mixin.py @@ -1,5 +1,5 @@ """ -Testing logic for live server instances, such as through selenium. +Universal mixin logic for live server instances, such as through selenium. Useful for testing things like JavaScript logic. Tends to take longer to test. So consider using IntegrationTestCase instead, when possible. @@ -21,7 +21,7 @@ from django_expanded_test_cases.constants import ( from django_expanded_test_cases.mixins.response_mixin import ResponseTestCaseMixin -class UniversalLiveServerTestCaseMixin(ResponseTestCaseMixin): +class LiveServerMixin(ResponseTestCaseMixin): """Universal logic for all selenium LiveServer test cases.""" # region Utility Functions @@ -507,5 +507,5 @@ class UniversalLiveServerTestCaseMixin(ResponseTestCaseMixin): # Define acceptable imports on file. __all__ = [ - 'UniversalLiveServerTestCaseMixin', + 'LiveServerMixin', ] diff --git a/django_expanded_test_cases/test_cases/channels_live_server_test_case.py b/django_expanded_test_cases/test_cases/channels_live_server_test_case.py index 8962142dfc8e74265c887c92f833ba3d9c7d7e8b..7ac96d4864da48adc818af5f82e82d5a228b5176 100644 --- a/django_expanded_test_cases/test_cases/channels_live_server_test_case.py +++ b/django_expanded_test_cases/test_cases/channels_live_server_test_case.py @@ -6,7 +6,6 @@ Tends to take longer to test. So consider using IntegrationTestCase instead, whe """ # System Imports. -import time # Third-Party Imports. from selenium import webdriver @@ -16,10 +15,10 @@ from channels.testing import ChannelsLiveServerTestCase as DjangoChannelsLiveSer from django.conf import settings # Internal Imports. -from .universal_live_server_test_case import UniversalLiveServerTestCaseMixin +from django_expanded_test_cases.mixins.live_server_mixin import LiveServerMixin -class ChannelsLiveServerTestCase(DjangoChannelsLiveServerTestCase, UniversalLiveServerTestCaseMixin): +class ChannelsLiveServerTestCase(DjangoChannelsLiveServerTestCase, LiveServerMixin): """Uses DjangoChannels package to test functionality through selenium. Simulates web browser navigation.""" @classmethod diff --git a/django_expanded_test_cases/test_cases/live_server_test_case.py b/django_expanded_test_cases/test_cases/live_server_test_case.py index c2c3fc9b78f40ede2bd07eb487de2f94002f3f23..53ae27da3045d255d5c3fc27a7f088b654f865fd 100644 --- a/django_expanded_test_cases/test_cases/live_server_test_case.py +++ b/django_expanded_test_cases/test_cases/live_server_test_case.py @@ -6,7 +6,6 @@ Tends to take longer to test. So consider using IntegrationTestCase instead, whe """ # System Imports. -import time # Third-Party Imports. from django.test import LiveServerTestCase as DjangoLiveServerTestCase @@ -16,10 +15,10 @@ from selenium.webdriver.firefox.service import Service as FireFoxService from django.conf import settings # Internal Imports. -from .universal_live_server_test_case import UniversalLiveServerTestCaseMixin +from django_expanded_test_cases.mixins.live_server_mixin import LiveServerMixin -class LiveServerTestCase(DjangoLiveServerTestCase, UniversalLiveServerTestCaseMixin): +class LiveServerTestCase(DjangoLiveServerTestCase, LiveServerMixin): """Uses Django package to test functionality through selenium. Simulates web browser navigation.""" @classmethod