diff --git a/src/py/crankshaft/test/test_clustering_moran.py b/src/py/crankshaft/test/test_clustering_moran.py index cc1930e..a91c046 100644 --- a/src/py/crankshaft/test/test_clustering_moran.py +++ b/src/py/crankshaft/test/test_clustering_moran.py @@ -71,10 +71,10 @@ class MoranTest(unittest.TestCase): random_seeds.set_random_seeds(1234) result = moran.local_stat('subquery', 'value', 'knn', 5, 99, 'the_geom', 'cartodb_id') - result = [(row[0], row[1]) for row in result] + result = [(row[0], row[6]) for row in result] zipped_values = zip(result, self.moran_data) - for ([res_val, res_quad], [exp_val, exp_quad]) in zipped_values: + for ([res_quad, res_val], [exp_val, exp_quad]) in zipped_values: self.assertAlmostEqual(res_val, exp_val) self.assertEqual(res_quad, exp_quad) @@ -89,11 +89,11 @@ class MoranTest(unittest.TestCase): moran = Moran(FakeDataProvider(data)) result = moran.local_rate_stat('subquery', 'numerator', 'denominator', 'knn', 5, 99, 'the_geom', 'cartodb_id') - result = [(row[0], row[1]) for row in result] + result = [(row[0], row[6]) for row in result] zipped_values = zip(result, self.moran_data) - for ([res_val, res_quad], [exp_val, exp_quad]) in zipped_values: + for ([res_quad, res_val], [exp_val, exp_quad]) in zipped_values: self.assertAlmostEqual(res_val, exp_val) def test_moran(self):