Beispiel #1
0
 def test_follow_user(self):
     u1 = User('foo', '*****@*****.**')
     u1.save()
     u2 = User('foo1', '*****@*****.**')
     u2.save()
     p1 = UserProfile(u1)
     p2 = UserProfile(u2)
     p1.save()
     p2.save()
     p1.follow(p2)
     assert p1.is_following(p2)
Beispiel #2
0
 def test_unfollow_user(self):
     u1 = User("foo", "*****@*****.**")
     u1.save()
     u2 = User("foo1", "*****@*****.**")
     u2.save()
     p1 = UserProfile(u1)
     p2 = UserProfile(u2)
     p1.save()
     p2.save()
     p1.follow(p2)
     assert p1.is_following(p2)
     p1.unfollow(p2)
     assert not p1.is_following(p2)
Beispiel #3
0
 def test_follow_self(self):
     u1 = User('foo', '*****@*****.**')
     u1.save()
     p1 = UserProfile(u1)
     p1.save()
     assert not p1.follow(p1)
Beispiel #4
0
 def test_follow_self(self):
     u1 = User("foo", "*****@*****.**")
     u1.save()
     p1 = UserProfile(u1)
     p1.save()
     assert not p1.follow(p1)