コード例 #1
0
 def test_actions_are_supported(self):
     self.container = CommandContainer()
     test_resource = TestResource()
     test_resource.add_command('test_action', TestAction())
     self.container.add_command('test_resource', test_resource)
     assert_equals(len(self._commands()[0].subcommands), 1)
コード例 #2
0
 def test_subcommands_are_recognized(self):
     self.container = CommandContainer()
     test_resource = TestResource()
     test_resource.add_command('test_resource_nested', TestResource())
     self.container.add_command('test_resource', test_resource)
     assert_equals(len(self._commands()[0].subcommands), 1)