class TestStaticgenPool(TestCase):

    def setUp(self):
        self.staticgen_pool = StaticgenPool()

    @override_settings(STATICGEN_FAIL_SILENTLY=False)
    def test_register(self):
        self.staticgen_pool.register(ExampleStaticView)
        self.assertTrue('example.staticgen_views.ExampleStaticView' in self.staticgen_pool.modules)
        self.assertRaises(StaticgenError, self.staticgen_pool.register, ExampleStaticView)

    @override_settings(STATICGEN_FAIL_SILENTLY=False)
    def test_register_type(self):
        self.assertRaises(StaticgenError, self.staticgen_pool.register, object)
Ejemplo n.º 2
0
class TestStaticgenPool(TestCase):
    def setUp(self):
        self.staticgen_pool = StaticgenPool()

    @override_settings(STATICGEN_FAIL_SILENTLY=False)
    def test_register(self):
        self.staticgen_pool.register(ExampleStaticView)
        self.assertTrue('example.staticgen_views.ExampleStaticView' in
                        self.staticgen_pool.modules)
        self.assertRaises(StaticgenError, self.staticgen_pool.register,
                          ExampleStaticView)

    @override_settings(STATICGEN_FAIL_SILENTLY=False)
    def test_register_type(self):
        self.assertRaises(StaticgenError, self.staticgen_pool.register, object)
 def setUp(self):
     self.staticgen_pool = StaticgenPool()
Ejemplo n.º 4
0
 def setUp(self):
     self.staticgen_pool = StaticgenPool()