Skip to content

Commit

Permalink
improve tests for new_feature field
Browse files Browse the repository at this point in the history
  • Loading branch information
willemarcel committed May 21, 2018
1 parent 21cbe6c commit b603ce2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions osmchadjango/changeset/tests/test_changeset_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1413,12 +1413,13 @@ def test_add_same_feature_twice(self):
response = self.client.post(self.url, data=self.data_3)
self.assertEqual(response.status_code, 200)
self.changeset.refresh_from_db()
self.assertEqual(
self.changeset.new_features,
[{
"id": 87765444,
"osm_type": "node",
"osm_version": 44,
"reasons": ["Deleted Motorway", "Relevant object deleted"]
}]
self.assertEqual(len(self.changeset.new_features), 1)
self.assertEqual(self.changeset.new_features[0]['id'], 87765444)
self.assertIn(
"Deleted Motorway",
self.changeset.new_features[0]['reasons']
)
self.assertIn(
"Relevant object deleted",
self.changeset.new_features[0]['reasons']
)

0 comments on commit b603ce2

Please sign in to comment.