Exemple #1
0
 def test_group_property(self):
     """Group.group property returns the group object."""
     group_update_view = GroupUpdateView()
     # Django would set this normally, but we're not testing the view here,
     # just testing the method works as intended given everything else works.
     group_update_view.kwargs = {'pk': self.group.pk}
     self.assertEqual(group_update_view.group, self.group)
 def test_group_property(self):
     """Group.group property returns the group object."""
     group_update_view = GroupUpdateView()
     # Django would set this normally, but we're not testing the view here,
     # just testing the method works as intended given everything else works.
     group_update_view.kwargs = {'pk': self.group.pk}
     self.assertEqual(group_update_view.group, self.group)
Exemple #3
0
 def test_group_property_doesnt_update_if_already_set(self):
     """Group.group property only looks up the group if it's unset."""
     # pylint: disable=protected-access
     group_update_view = GroupUpdateView()
     group_update_view._group = 'salooooooon!'
     self.assertEqual(group_update_view.group, 'salooooooon!')
 def test_group_property_doesnt_update_if_already_set(self):
     """Group.group property only looks up the group if it's unset."""
     # pylint: disable=protected-access
     group_update_view = GroupUpdateView()
     group_update_view._group = 'salooooooon!'
     self.assertEqual(group_update_view.group, 'salooooooon!')