Skip to content

Commit

Permalink
Fix tests for daiquiri.meetings
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Feb 23, 2018
1 parent f3e8efa commit e85c1e6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions daiquiri/meetings/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def _test_open_get(self, username):
'slug': instance.slug
})

self.assertIn('<input type="submit" value="Register"', msg['content'])
self.assertIn('<input type="text" name="affiliation"', msg['content'])
self.assertIn('<input type="radio" name="dinner" value="yes"', msg['content'])
self.assertIn('<input type="radio" name="dinner" value="no"', msg['content'])
self.assertIn('<input type="radio" name="contribution_type" value="talk"', msg['content'])
self.assertIn('<input type="radio" name="contribution_type" value="poster"', msg['content'])
self.assertIn(b'<input type="submit" value="Register"', msg['content'])
self.assertIn(b'<input type="text" name="affiliation"', msg['content'])
self.assertIn(b'<input type="radio" name="dinner" value="yes"', msg['content'])
self.assertIn(b'<input type="radio" name="dinner" value="no"', msg['content'])
self.assertIn(b'<input type="radio" name="contribution_type" value="talk"', msg['content'])
self.assertIn(b'<input type="radio" name="contribution_type" value="poster"', msg['content'])

def _test_open_post(self, username):
instance = Meeting.objects.filter(registration_open=True).first()
Expand Down Expand Up @@ -89,8 +89,8 @@ def _test_closed_get(self, username):
'slug': instance.slug
})

self.assertNotIn('<input type="submit" value="Register"', msg['content'])
self.assertIn('The registration is currently closed.', msg['content'])
self.assertNotIn(b'<input type="submit" value="Register"', msg['content'])
self.assertIn(b'The registration is currently closed.', msg['content'])

def _test_not_found_get(self, username):
self.assert_view('detail_view_not_found', 'get', 'update_view', username, {
Expand All @@ -111,7 +111,7 @@ def _test_open(self, username):
'slug': instance.slug
})

self.assertNotIn('The registration is currently closed.', msg['content'])
self.assertNotIn(b'The registration is currently closed.', msg['content'])

def _test_closed(self, username):
instance = Meeting.objects.filter(registration_open=False).first()
Expand All @@ -120,7 +120,7 @@ def _test_closed(self, username):
'slug': instance.slug
})

self.assertIn('The registration is currently closed.', msg['content'])
self.assertIn(b'The registration is currently closed.', msg['content'])

def _test_not_found(self, username):
self.assert_view('detail_view_not_found', 'get', 'detail_view', username, {
Expand All @@ -140,7 +140,7 @@ def _test_open(self, username):
'slug': instance.slug
})

self.assertIn('Tanja Testuser (Test)', msg['content'])
self.assertIn(b'Tanja Testuser (Test)', msg['content'])

def _test_closed(self, username):
instance = Meeting.objects.filter(participants_open=False).first()
Expand All @@ -149,7 +149,7 @@ def _test_closed(self, username):
'slug': instance.slug
})

self.assertIn('The list of participants is currently not available.', msg['content'])
self.assertIn(b'The list of participants is currently not available.', msg['content'])

def _test_not_found(self, username):
self.assert_view('detail_view_not_found', 'get', 'detail_view', username, {
Expand All @@ -169,7 +169,7 @@ def _test_open(self, username):
'slug': instance.slug
})

self.assertIn('Lorem ipsum dolor sit amet (Tanja Testuser)', msg['content'])
self.assertIn(b'Lorem ipsum dolor sit amet (Tanja Testuser)', msg['content'])

def _test_closed(self, username):
instance = Meeting.objects.filter(contributions_open=False).first()
Expand All @@ -178,7 +178,7 @@ def _test_closed(self, username):
'slug': instance.slug
})

self.assertIn('The list of contributions is currently not available.', msg['content'])
self.assertIn(b'The list of contributions is currently not available.', msg['content'])

def _test_not_found(self, username):
self.assert_view('detail_view_not_found', 'get', 'detail_view', username, {
Expand Down

0 comments on commit e85c1e6

Please sign in to comment.