def test_null_provider(self): """ Assert that the Null provider does nothing """ provider = NullBackendProvider() self.assertIsNone(provider.register_exam_attempt(None, None)) self.assertIsNone(provider.start_exam_attempt(None, None)) self.assertIsNone(provider.stop_exam_attempt(None, None)) self.assertIsNone(provider.mark_erroneous_exam_attempt(None, None)) self.assertIsNone(provider.get_software_download_url()) self.assertIsNone(provider.on_review_callback(None, None)) self.assertIsNone(provider.on_exam_saved(None))
def setup_test_backends(): """ Sets up the backend entrypoints required for testing. """ from django.apps import apps config = apps.get_app_config('edx_proctoring') from edx_proctoring.backends.tests.test_backend import TestBackendProvider from edx_proctoring.backends.null import NullBackendProvider from edx_proctoring.backends.mock import MockProctoringBackendProvider config.backends['test'] = TestBackendProvider() config.backends['null'] = NullBackendProvider() config.backends['mock'] = MockProctoringBackendProvider()
def test_null_provider(self): """ Assert that the Null provider does nothing """ provider = NullBackendProvider() self.assertIsNone(provider.register_exam_attempt(None, None)) self.assertIsNone(provider.start_exam_attempt(None, None)) self.assertIsNone(provider.stop_exam_attempt(None, None)) self.assertIsNone(provider.mark_erroneous_exam_attempt(None, None)) self.assertIsNone(provider.get_software_download_url()) self.assertIsNone(provider.on_review_callback(None, None)) self.assertIsNone(provider.on_exam_saved(None))