Exemple #1
0
 def test_loading_classes_with_root_app(self):
     import tests._site.shipping
     path = dirname(dirname(tests._site.shipping.__file__))
     with temporary_python_path([path]):
         self.installed_apps[self.installed_apps.index(
             'tests._site.shipping')] = 'shipping'
         with override_settings(INSTALLED_APPS=self.installed_apps):
             (Free, ) = get_classes('shipping.methods', ('Free', ))
             self.assertEqual('shipping.methods', Free.__module__)
 def test_loading_classes_with_root_app(self):
     import tests._site.shipping
     path = dirname(dirname(tests._site.shipping.__file__))
     with temporary_python_path([path]):
         self.installed_apps[
             self.installed_apps.index('tests._site.shipping')] = 'shipping'
         with override_settings(INSTALLED_APPS=self.installed_apps):
             (Free,) = get_classes('shipping.methods', ('Free',))
             self.assertEqual('shipping.methods', Free.__module__)