Exemple #1
0
 def test_use_narrow_if_default_is_none(self):
     self.user_profile.default_events_register_stream_id = None
     self.user_profile.save()
     result = _default_narrow(self.user_profile, [])
     self.assertEqual(result, [])
Exemple #2
0
 def test_use_default_if_narrow_is_empty(self):
     self.user_profile.default_events_register_stream_id = self.stream.id
     self.user_profile.save()
     result = _default_narrow(self.user_profile, [])
     self.assertEqual(result, [('stream', 'Verona')])
Exemple #3
0
 def test_use_passed_narrow_with_default(self):
     self.user_profile.default_events_register_stream_id = self.stream.id
     self.user_profile.save()
     result = _default_narrow(self.user_profile, [('stream', 'my_stream')])
     self.assertEqual(result, [('stream', 'my_stream')])
Exemple #4
0
 def test_use_narrow_if_default_is_none(self):
     self.user_profile.default_events_register_stream_id = None
     self.user_profile.save()
     result = _default_narrow(self.user_profile, [])
     self.assertEqual(result, [])
Exemple #5
0
 def test_use_default_if_narrow_is_empty(self):
     self.user_profile.default_events_register_stream_id = self.stream.id
     self.user_profile.save()
     result = _default_narrow(self.user_profile, [])
     self.assertEqual(result, [('stream', 'Verona')])
Exemple #6
0
 def test_use_passed_narrow_with_default(self):
     self.user_profile.default_events_register_stream_id = self.stream.id
     self.user_profile.save()
     result = _default_narrow(self.user_profile, [('stream', 'my_stream')])
     self.assertEqual(result, [('stream', 'my_stream')])