def test_put_user(self): """put_user() makes a PUT request to /Users/<id> with appropriate headers""" uaac = UAAClient("http://example.com", "foo", False) m = Mock() uaac._request = m user = {"id": "foo", "meta": {"version": "123"}} uaac.put_user(user) m.assert_called_with( urljoin("/Users", "foo"), "PUT", body=user, headers={"If-Match": "123"} )
def test_put_user(self): """put_user() makes a PUT request to /Users/<id> with appropriate headers""" uaac = UAAClient('http://example.com', 'foo', False) m = Mock() uaac._request = m user = { 'id': 'foo', 'meta': { 'version': '123' } } uaac.put_user(user) m.assert_called_with( urljoin('/Users', 'foo'), 'PUT', body=user, headers={'If-Match': '123'} )