def test_follow_user(self): httpretty.register_uri(httpretty.POST, api_url, body='{}', status=200, content_type='application/json') feed_manager.follow_user(1, 2) last_req = httpretty.last_request() self.assertTrue(last_req.path.split('?')[0].endswith('1/follows/'))
def test_follow_user(self): httpretty.register_uri( httpretty.POST, api_url, body="{}", status=200, content_type="application/json", ) feed_manager.follow_user(1, 2) last_req = httpretty.last_request() self.assertTrue(last_req.path.split("?")[0].endswith("1/follows/"))
def follow_feed(sender, instance, created, **kwargs): if created: feed_manager.follow_user(instance.user_id, instance.target_id)
def test_follow_user(self): httpretty.register_uri(httpretty.POST, api_url, body='{}', status=200, content_type='application/json') feed_manager.follow_user(1, 2)
def follow_change(sender, instance, created, **kwargs): if instance.deleted_at is None: feed_manager.follow_user(instance.user_id, instance.target_id) else: feed_manager.unfollow_user(instance.user_id, instance.target_id)
def follow_listner(sender, instance, created, **kwargs): if created: feed_manager.follow_user(instance.user.id, instance.target.id)
def follow_user_feed(follower_id, user_id): """ Task to follow a user feed. """ feed_manager.follow_user(follower_id, user_id)