Skip to content

test_zzzz_no_orphaned_actions doesn't make sense, failed #36

Closed
jasonculverhouse opened this Issue Sep 29, 2011 · 1 comment

2 participants

@jasonculverhouse

I' m not sure what this test was going for....

def test_zzzz_no_orphaned_actions(self):
    actions = actor_stream(self.user1).count()
    self.user2.delete()
    self.assertEqual(actions, actor_stream(self.user1).count() + 1)

actor_stream(self.user1) changes from:

[<Action: admin commented on CoolGroup 0 minutes ago>, <Action: admin started following Two 0 minutes ago>, <Action: admin joined CoolGroup 0 minutes ago>]

to

[<Action: admin commented on CoolGroup 3 minutes ago>, <Action: admin started following 3 minutes ago>, <Action: admin joined CoolGroup 3 minutes ago>]
@justquick
Owner

that tests to make sure that when an actor object is deleted that their actions are also deleted. this is a correct failure since the second action is <Action: admin started following 3 minutes ago> which should not be there because it references user2 (which is a null string in the output). deleting orphaned actions will be finally corrected in v0.4.0 by setting up GenericRelations on actionable models. unfortunately there is no good way to do it in 0.3.

@justquick justquick closed this Sep 30, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.