Пример #1
0
    def test_with_many_correct_urls(self):
        """
            Test with correct and simple urls.py defined in SCAN_MODULES.
        """
        test_modules = {
                'test_filled1': 'javascript_settings.test_urls.test_filled1.urls',
                'test_filled2': 'javascript_settings.test_urls.test_filled2.urls',
        }

        from javascript_settings.test_urls.test_filled1.urls import javascript_settings
        test_content1 = javascript_settings()

        from javascript_settings.test_urls.test_filled2.urls import javascript_settings
        test_content2 = javascript_settings()

        expected = {
                'test_filled1': test_content1,
                'test_filled2': test_content2,
        }

        self.assertBuildConfiguration(test_modules, expected)
Пример #2
0
    def test_with_correct_urls(self):
        """
            Test with correct urls.py defined in SCAN_MODULES.
        """
        test_module = 'javascript_settings.test_urls.test_filled2.urls'
        test_module_name = 'test_filled2'
        test_scan_modules = {test_module_name: test_module}

        from javascript_settings.test_urls.test_filled2.urls import javascript_settings
        test_content = javascript_settings()

        expected = {test_module_name: test_content}

        self.assertBuildConfiguration(test_scan_modules, expected)
Пример #3
0
    def test_with_correct_urls(self):
        """
            Test with correct urls.py defined in SCAN_MODULES.
        """
        test_module = 'javascript_settings.test_urls.test_filled2.urls'
        test_module_name = 'test_filled2'
        test_scan_modules = {test_module_name: test_module}

        from javascript_settings.test_urls.test_filled2.urls import \
            javascript_settings
        test_content = javascript_settings()

        expected = {test_module_name: test_content}

        self.assertBuildConfiguration(test_scan_modules, expected)
Пример #4
0
    def test_with_many_correct_urls(self):
        """
            Test with correct and simple urls.py defined in SCAN_MODULES.
        """
        test_modules = {
            'test_filled1': 'javascript_settings.test_urls.test_filled1.urls',
            'test_filled2': 'javascript_settings.test_urls.test_filled2.urls',
        }

        from javascript_settings.test_urls.test_filled1.urls import \
            javascript_settings
        test_content1 = javascript_settings()

        from javascript_settings.test_urls.test_filled2.urls import \
            javascript_settings as javascript_settings2
        test_content2 = javascript_settings2()

        expected = {
            'test_filled1': test_content1,
            'test_filled2': test_content2,
        }

        self.assertBuildConfiguration(test_modules, expected)