Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_zzzz_no_orphaned_actions doesn't make sense, failed #36

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

Comments

@jasonculverhouse
Copy link
Contributor

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
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants