示例#1
0
    def test_call(self, mock_response):
        mock = create_mock_json('tests/resources/login_success.json')
        mock_response.return_value = mock
        response = self.login()

        assert response == mock.json()
        assert self.login.client.session_token == mock.json().get('sessionToken')
    def test_call(self, mock_response):
        mock = create_mock_json('tests/resources/keep_alive_success.json')
        mock_response.return_value = mock
        response = self.keep_alive()

        assert response == mock.json()
        assert self.keep_alive.client.session_token == mock.json().get('token')
示例#3
0
    def test_call(self, mock_response):
        mock = create_mock_json('tests/resources/logout_success.json')
        mock_response.return_value = mock
        response = self.logout()

        assert response == mock.json()
        assert self.logout.client.session_token is None