def __init__(self, config, messaging): self.config = config self.publish_manager = messaging(config=config, queue='status') self.uuid = get_uuid(config['uuid_source']) self.type = config['type'] self.running = False
def test_get_uuid_wrong_content(self): filename = 'tests/files/uuid_wrong.txt' uuid = get_uuid(filename) self.assertIs(str, type(uuid))
def test_get_uuid_wrong_path(self): filename = 'wrong/path' uuid = get_uuid(filename) self.assertIs(str, type(uuid))
def test_get_uuid(self): filename = 'tests/files/uuid.txt' uuid = get_uuid(filename) self.assertIs(str, type(uuid))
def insert(self, value): self.collection[get_uuid()] = copy(value)