diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2017-07-19 00:01:09 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-07-18 15:01:09 -0400 |
| commit | dc738a0c76f5a15d8a81c3436ca1c4532d82a62f (patch) | |
| tree | aef9ae7433ca9ff967189981f86a8c816b4d29b3 /tests/gis_tests/rasterapp | |
| parent | 62917cee5ac75693aa5d9a3de5d8935da2f011df (diff) | |
Removed redundant lookup values in RasterFieldTest.test_all_gis_lookups_with_rasters.
These values produce already tested lookups and prevent another one from
being tested.
Diffstat (limited to 'tests/gis_tests/rasterapp')
| -rw-r--r-- | tests/gis_tests/rasterapp/test_rasterfield.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/gis_tests/rasterapp/test_rasterfield.py b/tests/gis_tests/rasterapp/test_rasterfield.py index a82a683558..f77c9ae6e8 100644 --- a/tests/gis_tests/rasterapp/test_rasterfield.py +++ b/tests/gis_tests/rasterapp/test_rasterfield.py @@ -169,16 +169,27 @@ class RasterFieldTest(TransactionTestCase): # Set lookup values for all function based operators. combo_values = [ rast, (rast, 0), (rast, 0), (stx_pnt, 0), stx_pnt, - rast, rast, json.loads(JSON_RASTER) + rast, json.loads(JSON_RASTER) ] else: # Override band lookup for these, as it's not supported. combo_keys[2] = 'rastprojected__' + name # Set lookup values for all other operators. - combo_values = [rast, rast, rast, stx_pnt, stx_pnt, rast, rast, json.loads(JSON_RASTER)] + combo_values = [rast, None, rast, stx_pnt, stx_pnt, rast, json.loads(JSON_RASTER)] # Create query filter combinations. - combos = [{x[0]: x[1]} for x in zip(combo_keys, combo_values)] + self.assertEqual( + len(combo_keys), + len(combo_values), + 'Number of lookup names and values should be the same', + ) + combos = list(x for x in zip(combo_keys, combo_values) if x[1]) + self.assertEqual( + [(n, x) for n, x in enumerate(combos) if x in combos[:n]], + [], + 'There are repeated test lookups', + ) + combos = [{k: v} for k, v in combos] for combo in combos: # Apply this query filter. |
