Commit 0019e280 authored by jocelyn's avatar jocelyn
Browse files

Remove duplicate code in tests

iso-functional commit
parent f8c620b6
......@@ -206,30 +206,9 @@ class TestForms(TestCase):
@override_settings(NOTIFICATION_EMAILS=['foo@example.com'])
def test_add_contrib_like_a_robot(self):
response = self.client.post('/map/contribute', {
'roof': True,
'human_field': 'should not have no value',
'privacy_place_details': True,
'privacy_coordinates': True,
'phone': '0202020202',
'orientations': 'N',
'orientations': 'NO',
'orientations': 'O',
'orientations': 'SO',
'orientations': 'S',
'orientations': 'SE',
'orientations': 'E',
'orientations': 'NE',
'orientation': 'all',
'name': 'JohnCleese',
'longitude': -1.553621,
'latitude': 47.218371,
'floor_total': '2',
'floor': 1,
'email': 'coucou@example.com',
'contrib_type': 'connect',
'connect_local': 'on',
})
robot_data = self.valid_data.copy()
robot_data['human_field'] = 'should contain no value'
response = self.client.post('/map/contribute', robot_data)
self.assertEqual(response.status_code, 403)
self.assertEqual(len(mail.outbox), 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment