def test_run_dijkstra_with_incorrect_start_vertex_return_error(self): model = DAViewModel() model.set_num_vertex('3') model.set_start_vertex('-2') matrix = [['0', '2', '1'], ['2', '0', '3'], ['1', '3', '0']] model.run_dijkstra(matrix) self.assertEqual(model.get_error(), "Wrong value of source vertex")
def test_run_dijkstra_with_incorrect_weights_return_error(self): model = DAViewModel() model.set_num_vertex('3') model.set_start_vertex('2') matrix = [['0', '5', '1'], ['2', '0', '3'], ['1', '3', '0']] model.run_dijkstra(matrix) self.assertEqual(model.get_error(), "Matrix is not symmetric")