Beispiel #1
0
 def test_script(self, execute_manager):
     # The manage script is a replacement for the default manage.py
     # script. It has all the same bells and whistles since all it
     # does is call the normal Django stuff.
     manage.main('cheeseshop.development')
     self.assertEqual(execute_manager.call_args,
                      ((self.settings,), {}))
Beispiel #2
0
 def test_settings_error(self, sys_exit):
     # When the settings file cannot be imported the management
     # script it wil exit with a message and a specific exit code.
     manage.main('cheeseshop.tilsit')
     self.assertEqual(sys_exit.call_args, ((1,), {}))