class TestRegister(TestCase, WagtailTestUtils):
    def setUp(self):
        self.registry = Registry()
        self.login()

    def test_register(self):
        self.assertNotIn(NotYetRegisteredSetting, self.registry)
        NowRegisteredSetting = self.registry.register_decorator(NotYetRegisteredSetting)
        self.assertIn(NotYetRegisteredSetting, self.registry)
        self.assertIs(NowRegisteredSetting, NotYetRegisteredSetting)

    def test_icon(self):
        admin = self.client.get(reverse('wagtailadmin_home'))
        self.assertContains(admin, 'icon icon-tag')
Exemple #2
0
class TestRegister(TestCase, WagtailTestUtils):
    def setUp(self):
        self.registry = Registry()
        self.login()

    def test_register(self):
        self.assertNotIn(NotYetRegisteredSetting, self.registry)
        NowRegisteredSetting = self.registry.register_decorator(NotYetRegisteredSetting)
        self.assertIn(NotYetRegisteredSetting, self.registry)
        self.assertIs(NowRegisteredSetting, NotYetRegisteredSetting)

    def test_icon(self):
        admin = self.client.get(reverse('wagtailadmin_home'))
        self.assertContains(admin, 'icon icon-tag')
Exemple #3
0
class GenericSettingRegisterTestCase(TestCase, WagtailTestUtils):
    def setUp(self):
        self.registry = Registry()
        self.login()

    def test_register(self):
        self.assertNotIn(NotYetRegisteredGenericSetting, self.registry)
        NowRegisteredGenericSetting = self.registry.register_decorator(
            NotYetRegisteredGenericSetting)
        self.assertIn(NotYetRegisteredGenericSetting, self.registry)
        self.assertIs(NowRegisteredGenericSetting,
                      NotYetRegisteredGenericSetting)

    def test_icon(self):
        admin = self.client.get(reverse("wagtailadmin_home"))
        self.assertContains(admin, "icon-setting-tag")
 def setUp(self):
     self.registry = Registry()
     self.login()
Exemple #5
0
 def setUp(self):
     self.registry = Registry()
     self.login()