def test_get_meta_custom_namespace(self):
        m = MetadataMixin()
        self.assertEqual(m.get_meta_custom_namespace(), None)

        m.custom_namespace = "my-website"
        self.assertEqual(m.get_meta_custom_namespace(), 'my-website')

        settings.OG_NAMESPACES = ['foo', 'bar']
        m = MetadataMixin()
        self.assertEqual(m.get_meta_custom_namespace(), ['foo', 'bar'])
        settings.OG_NAMESPACES = None
Esempio n. 2
0
    def test_get_meta_custom_namespace(self):
        m = MetadataMixin()
        self.assertEqual(
            m.get_meta_custom_namespace(),
            None
        )

        m.custom_namespace = "my-website"
        self.assertEqual(
            m.get_meta_custom_namespace(),
            'my-website'
        )
Esempio n. 3
0
    def test_get_meta_custom_namespace(self):
        m = MetadataMixin()
        self.assertEqual(
            m.get_meta_custom_namespace(),
            None
        )

        m.custom_namespace = "my-website"
        self.assertEqual(
            m.get_meta_custom_namespace(),
            'my-website'
        )
Esempio n. 4
0
    def test_get_meta_custom_namespace(self):
        m = MetadataMixin()
        self.assertEqual(
            m.get_meta_custom_namespace(),
            None
        )

        m.custom_namespace = "my-website"
        self.assertEqual(
            m.get_meta_custom_namespace(),
            'my-website'
        )

        settings.OG_NAMESPACES = ['foo', 'bar']
        m = MetadataMixin()
        self.assertEqual(
            m.get_meta_custom_namespace(),
            ['foo', 'bar']
        )
        settings.OG_NAMESPACES = None