Esempio n. 1
0
    def test_with_global_view(self):
        """Checks that the app name of a global view is
        the project name"""

        self.global_view = lambda: None
        self.global_view.__module__ = 'foobar.views'
        self.assertEqual(utils._get_app_name(self.global_view), 'foobar')
Esempio n. 2
0
    def test_with_app_view(self):
        """Checks that the app name of an app view is
        retrieved correctly"""

        self.app_view = ugly
        self.assertEqual(utils._get_app_name(self.app_view), 'failclose')