def test_retraction_initiator_has_backref(self): self.registration.retract_registration(self.user, self.valid_justification) self.registration.save() self.registration.reload() assert_equal( Retraction.find(Q('initiated_by', 'eq', self.user)).count(), 1)
def test_retraction_initiator_has_backref(self): self.registration.retract_registration(self.user, self.valid_justification) self.registration.save() self.registration.reload() assert_equal(Retraction.find(Q('initiated_by', 'eq', self.user)).count(), 1)
def test_initiate_retraction_saves_retraction(self): initial_count = Retraction.find().count() self.registration._initiate_retraction(self.user) assert_equal(Retraction.find().count(), initial_count + 1)
def test_initiate_retraction_with_save_does_save_retraction(self): initial_count = Retraction.find().count() self.registration._initiate_retraction(self.user, save=True) self.assertEqual(Retraction.find().count(), initial_count + 1)
def test_initiate_retraction_does_not_save_retraction(self): initial_count = Retraction.find().count() self.registration._initiate_retraction(self.user) self.assertEqual(Retraction.find().count(), initial_count)