I have a method:
def retrieve_datetime_and_device(self, response):
node_dict = response[0][0]._properties
dt = node_dict.get("datetime")
device = node_dict.get("name")
return dt, device
The response is a return from a neo4j query. I'd like to write a unittest for this, however I am unsure how to test when the input for the method requires a Record instance
A typical Record looks like:
response = [<Record n=<Node id=902350 labels=frozenset({'DEvice1'}) properties={'name': 'myname', 'Src': 'Somewhere', 'Filename': 'test.xlsx', 'datetime': '2021-02-04 15:14:37'}>>]
How can I test this?