def test_set_get_version(self): """ Application version accessors behave properly """ application = Application() application.set_version("bar") self.assertEqual("bar", application.get_version(), msg=".set_version() sets the version of the application")
def test_set_get_version(self): """ Application version accessors behave properly """ application = Application() application.set_version('bar') self.assertEqual('bar', application.get_version(), msg='.set_version() sets the version of the application')
def test_constructor(self): """ Application.__init__() behaves properly """ application = Application('foo', 'bar') self.assertEqual('foo', application.get_name(), msg='__init__() takes the application name as its first argument') self.assertEqual('bar', application.get_version(), msg='__init__() takes the application version as its second argument') self.assertEqual(['help', 'list'].sort(), list(application.all().keys()).sort(), msg='__init__() registered the help and list commands by default')
def test_constructor(self): """ Application.__init__() behaves properly """ application = Application("foo", "bar") self.assertEqual( "foo", application.get_name(), msg="__init__() takes the application name as its first argument" ) self.assertEqual( "bar", application.get_version(), msg="__init__() takes the application version as its second argument" ) self.assertEqual( ["help", "list"].sort(), list(application.all().keys()).sort(), msg="__init__() registered the help and list commands by default", )