コード例 #1
0
ファイル: tests.py プロジェクト: iitians/cg-uaa-extras
    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"}
        )
コード例 #2
0
ファイル: tests.py プロジェクト: 18F/cg-uaa-invite
    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'}
        )
コード例 #3
0
    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'}
        )