Exemple #1
0
 def test_main_works(self):
     command.make_app().AndReturn(self.app)
     command.ConfigDAO.get('test', 'var').AndReturn(None)
     self.mox.ReplayAll()
     command.main(['test', 'get', 'test.var'])
Exemple #2
0
 def test_main_catches(self):
     command.show_help(['test']).AndRaise(RuntimeError('catch me'))
     command.die('Failed: %s', mox.IsA(RuntimeError))
     self.mox.ReplayAll()
     command.main(['test'])