def test_follow_unfollow_followers(self): g = NetworkGraph() g.set_follow('alex', 'bernard') g.set_follow('caroline', 'bernard') g.set_unfollow('alex', 'bernard') self.assertEqual(['caroline'], sorted(list(g.get_followers('bernard'))))
def test_follow_unfollow_following(self): g = NetworkGraph() g.set_follow('alex', 'bernard') g.set_follow('alex', 'caroline') g.set_unfollow('alex', 'bernard') self.assertEqual(['caroline'], list(g.get_following('alex')))