/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos-ctl

  • Committer: Teddy Hogeborn
  • Date: 2019-03-16 04:38:35 UTC
  • Revision ID: teddy@recompile.se-20190316043835-xlmz9xse3bh1u5u6
mandos-ctl: Refactor tests

* mandos-ctl (Test_get_managed_objects): Remove some useless
                                         "@staticmethod"s.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1056
1056
    def test_calls_and_returns_GetManagedObjects(self):
1057
1057
        managed_objects = {"/clients/foo": { "Name": "foo"}}
1058
1058
        class MockObjectManager(object):
1059
 
            @staticmethod
1060
 
            def GetManagedObjects():
 
1059
            def GetManagedObjects(self):
1061
1060
                return managed_objects
1062
1061
        retval = get_managed_objects(MockObjectManager())
1063
1062
        self.assertDictEqual(managed_objects, retval)
1066
1065
        dbus_logger = logging.getLogger("dbus.proxies")
1067
1066
 
1068
1067
        class MockObjectManagerFailing(object):
1069
 
            @staticmethod
1070
 
            def GetManagedObjects():
 
1068
            def GetManagedObjects(self):
1071
1069
                dbus_logger.error("Test")
1072
1070
                raise dbus.exceptions.DBusException("Test")
1073
1071