def test_friendViewAccess_false(self): author1 = Author() author2 = Author() author1.save() author2.save() test_post = Post(author=author1) test_post.save() self.assertFalse(test_post.friendViewAccess(author2))
def test_friendViewAccess_true(self): author1 = Author() author2 = Author() author1.save() author2.save() author1.friends.add(author2) author2.friends.add(author1) test_post = Post(author=author1) test_post.save() self.assertTrue(test_post.friendViewAccess(author2))