Ejemplo n.º 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)
Ejemplo n.º 2
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)
Ejemplo n.º 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!')
Ejemplo n.º 4
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!')