Skip to content

Commit

Permalink
Merge pull request #2658 from data-for-change/2657-modify-location-ac…
Browse files Browse the repository at this point in the history
…curacy

add location accuracy = 3 in SubUrban roads
  • Loading branch information
atalyaalon authored May 29, 2024
2 parents 3a0d580 + 4fef77c commit 26dff1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions anyway/backend_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class ResolutionCategories(Enum):
]

RESOLUTION_ACCURACY_VALUES: dict = {
ResolutionCategories.SUBURBAN_JUNCTION: [1, 4],
ResolutionCategories.SUBURBAN_ROAD: [1, 4],
ResolutionCategories.SUBURBAN_JUNCTION: [1, 3, 4],
ResolutionCategories.SUBURBAN_ROAD: [1, 3, 4],
ResolutionCategories.URBAN_JUNCTION: [1, 3],
ResolutionCategories.STREET: [1, 3],
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_infographic_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def test_fatal_yoy_monthly(self):
"type": "object",
"properties": {"label_key": {"type": "number"}, "value": {"type": "number"}, },
}
assert widget["data"]["items"][0] == {'label_key': 2014, 'value': 24}
assert widget["data"]["items"][0] == {'label_key': 2014, 'value': 29}
validate(widget["data"]["items"][0], schema)
assert widget["data"]["text"]["title"] == "כמות ההרוגים בתאונות דרכים בחודש הנוכחי בהשוואה לשנים קודמות"

Expand Down
6 changes: 3 additions & 3 deletions tests/test_infographics_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ def test_add_resolution_location_accuracy_filter(self):
actual = add_resolution_location_accuracy_filter(None, RC.STREET)
self.assertEqual({'location_accuracy': [1, 3]}, actual, "3")
actual = add_resolution_location_accuracy_filter(f, RC.SUBURBAN_JUNCTION)
self.assertEqual({'1': 1, 'location_accuracy': [1, 4]}, actual, "4")
self.assertEqual({'1': 1, 'location_accuracy': [1, 3, 4]}, actual, "4")
actual = add_resolution_location_accuracy_filter(None, RC.SUBURBAN_ROAD)
self.assertEqual({'location_accuracy': [1, 4]}, actual, "5"
self.assertEqual({'location_accuracy': [1, 3, 4]}, actual, "5"
)
actual = add_resolution_location_accuracy_filter(f, RC.SUBURBAN_JUNCTION)
self.assertEqual({'1': 1, 'location_accuracy': [1, 4]}, actual, "6",)
self.assertEqual({'1': 1, 'location_accuracy': [1, 3, 4]}, actual, "6",)
actual = add_resolution_location_accuracy_filter(None, RC.STREET)
self.assertEqual({'location_accuracy': [1, 3]}, actual, "7")
actual = add_resolution_location_accuracy_filter(f, RC.OTHER)
Expand Down

0 comments on commit 26dff1e

Please sign in to comment.