diff --git a/explorer/nodewatch/tests/test_RoutesFacade.py b/explorer/nodewatch/tests/test_RoutesFacade.py index 13e64880a..db7b9b0d2 100644 --- a/explorer/nodewatch/tests/test_RoutesFacade.py +++ b/explorer/nodewatch/tests/test_RoutesFacade.py @@ -226,7 +226,7 @@ def test_can_reload_all(self): self.assertEqual(True, result) self.assertEqual(facade.last_reload_time, facade.last_refresh_time) - self.assertEqual(6, len(facade.repository.node_descriptors)) + self.assertEqual(8, len(facade.repository.node_descriptors)) self.assertEqual(4, len(facade.repository.harvester_descriptors)) self.assertEqual(4, len(facade.repository.voter_descriptors)) @@ -243,7 +243,7 @@ def test_can_skip_reload_when_noop(self): self.assertEqual([True, False, False], [result1, result2, result3]) self.assertEqual(facade.last_reload_time, facade.last_refresh_time) - self.assertEqual(6, len(facade.repository.node_descriptors)) + self.assertEqual(8, len(facade.repository.node_descriptors)) self.assertEqual(4, len(facade.repository.harvester_descriptors)) self.assertEqual(4, len(facade.repository.voter_descriptors)) @@ -293,9 +293,9 @@ def test_can_render_nodes_html(self): self.assertEqual(4, len(context)) self.assertEqual('Symbol Nodes', context['title']) self.assertEqual( - ['Allnodes250', 'Apple', 'Shin-Kuma-Node', 'ibone74', 'jaguar', 'symbol.ooo maxUnlockedAccounts:100'], + ['Allnodes250', 'Apple', 'Shin-Kuma-Node', 'ibone74', 'jaguar', 'symbol.ooo maxUnlockedAccounts:100', 'xym pool', 'yasmine farm'], _get_names(context['descriptors'])) - self.assertEqual([104] * 6, _get_network_bytes(context['descriptors'])) + self.assertEqual([104] * 8, _get_network_bytes(context['descriptors'])) self.assertIsNotNone(context['version_to_css_class']) self.assertEqual('', context['explorer_endpoint']) @@ -328,7 +328,7 @@ def test_can_render_summary_html(self): # Assert: self.assertEqual('symbol_summary.html', template_name) self.assertEqual(5, len(context)) - self.assertEqual(4, len(json.loads(context['height_chart_json'])['data'])) # { height, finalized_height } x { 1.0.3.5, 1.0.3.4 } + self.assertEqual(6, len(json.loads(context['height_chart_json'])['data'])) # { height, finalized_height } x { 1.0.3.5, 1.0.3.4 } self.assertEqual(4, len(json.loads(context['voting_power_chart_json'])['data'])) # 1.0.3.5, 1.0.3.4, 1.0.3.3, '' self.assertEqual(4, len(json.loads(context['harvesting_power_chart_json'])['data'])) # 1.0.3.5, 1.0.3.4, 1.0.3.3, '' self.assertEqual(4, len(json.loads(context['harvesting_count_chart_json'])['data'])) # 1.0.3.5, 1.0.3.4, 1.0.3.3, '' @@ -364,12 +364,12 @@ def test_can_generate_nodes_json(self): node_descriptors = facade.json_nodes(role=1) # Assert: spot check names and roles - self.assertEqual(5, len(node_descriptors)) + self.assertEqual(7, len(node_descriptors)) self.assertEqual( - ['Apple', 'Shin-Kuma-Node', 'ibone74', 'jaguar', 'symbol.ooo maxUnlockedAccounts:100'], + ['Apple', 'Shin-Kuma-Node', 'ibone74', 'jaguar', 'symbol.ooo maxUnlockedAccounts:100', 'xym pool', 'yasmine farm'], list(map(lambda descriptor: descriptor['name'], node_descriptors))) self.assertEqual( - [7, 3, 3, 5, 3], + [7, 3, 3, 5, 3, 3, 3], list(map(lambda descriptor: descriptor['roles'], node_descriptors))) def test_can_generate_nodes_json_filtered(self): @@ -381,12 +381,12 @@ def test_can_generate_nodes_json_filtered(self): node_descriptors = facade.json_nodes(role=2) # Assert: spot check names and roles - self.assertEqual(5, len(node_descriptors)) + self.assertEqual(7, len(node_descriptors)) self.assertEqual( - ['Allnodes250', 'Apple', 'Shin-Kuma-Node', 'ibone74', 'symbol.ooo maxUnlockedAccounts:100'], + ['Allnodes250', 'Apple', 'Shin-Kuma-Node', 'ibone74', 'symbol.ooo maxUnlockedAccounts:100', 'xym pool', 'yasmine farm'], list(map(lambda descriptor: descriptor['name'], node_descriptors))) self.assertEqual( - [2, 7, 3, 3, 3], + [2, 7, 3, 3, 3, 3, 3], list(map(lambda descriptor: descriptor['roles'], node_descriptors))) def test_can_generate_nodes_json_filtered_exact_match(self): @@ -415,7 +415,7 @@ def test_can_generate_height_chart_json(self): chart_json = json.loads(facade.json_height_chart()) # Assert: { height, finalized_height } x { 1.0.3.4, 1.0.3.5 } - self.assertEqual(4, len(chart_json['data'])) + self.assertEqual(6, len(chart_json['data'])) def test_can_generate_height_chart_with_metadata_json(self): # Arrange: @@ -428,7 +428,7 @@ def test_can_generate_height_chart_with_metadata_json(self): # Assert: { height, finalized_height } x { 1.0.3.4, 1.0.3.5 } self.assertEqual(2, len(chart_with_metadata_json)) - self.assertEqual(4, len(chart_json['data'])) + self.assertEqual(6, len(chart_json['data'])) self.assertTrue(re.match(r'\d\d:\d\d', chart_with_metadata_json['lastRefreshTime'])) def test_can_retrieve_estimated_network_height_json(self):