예제 #1
0
class TestCommander(TestBaseOrders):
    """Tests the usage generated by the API for a command
    """

    def setUp(self):
        super(TestCommander, self).setUp()
        self.commander = Commander(self.module, self.command)

    def tearDown(self):
        del self.commander
        super(TestCommander, self).tearDown()

    def test_usage(self):
        """Tests the usage of a command
        """
        assert self.commander.usage() == 'Usage: {0} order [options] [args]'\
            .format(self.command)

    def test_run_not_implemented(self):
        """Tests implemented the execute method on commander
        """
        assert self.commander([]) == self.commander.usage()
예제 #2
0
 def setUp(self):
     super(TestCommander, self).setUp()
     self.commander = Commander(self.module, self.command)