MCPcopy Index your code
hub / github.com/WebODM/WebODM / test_online_processing_node

Method test_online_processing_node

nodeodm/tests.py:56–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

54 self.assertTrue(len(options) > 0, "Found options")
55
56 def test_online_processing_node(self):
57 with start_processing_node():
58 online_node = ProcessingNode.objects.get(pk=1)
59 self.assertTrue(str(online_node) == "localhost:11223", "Formatting string works")
60 self.assertTrue(online_node.last_refreshed == None, "Last refreshed not yet set")
61 self.assertTrue(len(online_node.available_options) == 0, "Available options not yet set")
62 self.assertTrue(online_node.api_version == "", "API version is not set")
63
64 self.assertTrue(online_node.update_node_info(), "Could update info")
65 self.assertTrue(online_node.last_refreshed is not None, "Last refreshed is set")
66 self.assertTrue(len(online_node.available_options) > 0, "Available options are set")
67 self.assertTrue(online_node.api_version != "", "API version is set")
68 self.assertTrue(online_node.max_images is None, "No max images limit is set")
69
70 self.assertTrue(isinstance(online_node.get_available_options_json(), six.string_types), "Available options json works")
71 self.assertTrue(isinstance(online_node.get_available_options_json(pretty=True), six.string_types), "Available options json works with pretty")
72
73
74 def test_offline_processing_node(self):

Callers

nothing calls this directly

Calls 4

start_processing_nodeFunction · 0.90
update_node_infoMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected