Ejemplo n.º 1
0
 def test_core(self):
     site = factories.SiteFactory()
     request = RequestFactory().get('/')
     request.LANGUAGE_CODE = LANGUAGE_CODE
     request.site = site
     expected_output = {
         'site': site,
         'platform_name': PLATFORM_NAME,
         'language_code': LANGUAGE_CODE,
     }
     self.assertDictEqual(core(request), expected_output)
 def test_core(self):
     site = factories.SiteFactory()
     request = RequestFactory().get('/')
     request.LANGUAGE_CODE = LANGUAGE_CODE
     request.site = site
     expected_output = {
         'site': site,
         'platform_name': PLATFORM_NAME,
         'language_code': LANGUAGE_CODE,
     }
     self.assertDictEqual(core(request), expected_output)
Ejemplo n.º 3
0
    def test_core(self):
        site_configuration = factories.SiteConfigurationFactory()

        request = RequestFactory().get('/')
        request.LANGUAGE_CODE = LANGUAGE_CODE
        request.site = site_configuration.site

        expected_output = {
            'site': site_configuration.site,
            'language_code': LANGUAGE_CODE,
            'platform_name': site_configuration.platform_name
        }

        self.assertDictEqual(core(request), expected_output)
    def test_core(self):
        site_configuration = factories.SiteConfigurationFactory()

        request = RequestFactory().get("/")
        request.LANGUAGE_CODE = LANGUAGE_CODE
        request.site = site_configuration.site

        expected_output = {
            "site":
            site_configuration.site,
            "language_code":
            LANGUAGE_CODE,
            "platform_name":
            site_configuration.platform_name,
            "site_logo_url":
            getattr(settings, "LOGO_URL", ""),
            "openedx_logo_url":
            getattr(settings, "LOGO_POWERED_BY_OPEN_EDX_URL", ""),
            "favicon_url":
            getattr(settings, "FAVICON_URL", ""),
        }

        self.assertDictEqual(core(request), expected_output)
 def test_core(self):
     request = RequestFactory().get("/")
     self.assertDictEqual(core(request), {"platform_name": PLATFORM_NAME})
 def test_core(self):
     request = RequestFactory().get('/')
     self.assertDictEqual(core(request), {'platform_name': PLATFORM_NAME})