def test_post_like_create_base(self, mock_post): c = Customer(node=self.node, default_attributes={}, id='01') j = Like(customer=c, id='id', category='category', name='name', createdTime='1994-02-11T14:05M') j.post() mock_post.assert_called_with(self.base_url_customer +'/' + c.id + '/likes', headers=self.headers_expected, json=j.attributes) assert c.base.likes[0].attributes == j.attributes, (c.base.likes[0].attributes, j.attributes)
def test_post_like(self, mock_post): j = Like(customer=self.customer, id='id', category='category', name='name', createdTime='1994-02-11T14:05M') j.post() mock_post.assert_called_with(self.base_url_customer +'/' + self.customer.id + '/likes', headers=self.headers_expected, json=j.attributes) assert self.customer.base.likes[0].attributes == j.attributes, (self.customer.base.likes[0].attributes ,j.attributes)