Ghostkeeper
70924f17aa
Mock HttpRequestManager getting the profile with refresh token
...
I'm not sure the refresh token is actually used though. I might want to try to guarantee that.
Contributes to issue CURA-8539.
2021-11-22 13:44:46 +01:00
Ghostkeeper
3b6ff15d60
Rewrite test to mock HttpRequestManager with authentication failure
...
That's the expected outcome of the premise of this test.
Contributes to issue CURA-8539.
2021-11-22 13:25:15 +01:00
Ghostkeeper
c8aff57bfe
Actually mock a reply from the auth server
...
The reply is not really relevant. The reply is mocked through readJSON.
So it turns out that so far, our tests have been making actual requests to the authentication server, and depended on it being online. Not good. Mock those external dependencies!
Contributes to issue CURA-8539.
2021-11-22 12:11:45 +01:00
Ghostkeeper
f0cbdeb903
Use docstring format for this documentation
...
Contributes to issue CURA-8539.
2021-11-22 10:50:06 +01:00
Ghostkeeper
9dd251975d
Test for result of callback with a callable
...
In this case the callback should get called immediately (no wait) so it is safe to test for this callback, albeit slightly implementation-defined.
Contributes to issue CURA-8539.
2021-11-22 10:48:45 +01:00
Konstantinos Karmas
3be4b1a441
Fix failing test
...
CURA-8441
2021-08-09 12:42:11 +02:00
Gabriel Féron
e26cf6f810
Fix test_wrongServerResponses
2021-04-26 11:07:11 +02:00
Kostas Karmas
32efb8d7bb
Fix description comment of _generate_auth_url()
...
CURA-7427
2020-05-12 13:17:18 +02:00
Kostas Karmas
d3fb002d9b
Transfer the generation of the auth link into its own function
...
The authentication link should be prepended with a logoff link from
mycloud, if it is requested. In order to make this process testable
this commit separates the generation of the authentication link,
based on whether it requests for a browser logoff first, into its
own function.
This commit also adds tests for this function.
CURA-7427
2020-05-12 13:07:39 +02:00
Lipu Fei
e8fd013329
Fix OAuth2 test
2019-08-15 09:23:05 +02:00
Jaime van Kessel
9e6263b1f1
Change instances of assert_called_once to assert_called_once_with
...
Grumbles something about python 3.5 and 3.6...
2019-05-21 14:56:00 +02:00
Jaime van Kessel
0c11304a7b
Expand the oath tests with some extra failure cases
2019-05-17 16:09:23 +02:00
Jaime van Kessel
23bd611470
Added some tests for unhappy path of OAuth
2019-05-17 15:29:28 +02:00
ChrisTerBeke
a7071e2d3d
Fix unit tests
2019-02-08 22:53:12 +01:00
Lipu Fei
3a01b63343
Fix refactor and tests
2018-09-28 12:33:16 +02:00
Jaime van Kessel
47c5dbaf84
Add extra unit test that tests the storing and loading of data to the preferences
2018-09-27 13:07:37 +02:00
Jaime van Kessel
202cf698c3
Change callback for succes / failure to the new location
...
CURA-5744
2018-09-27 11:56:19 +02:00
Jaime van Kessel
d5dbf91a4f
Switch unit test to use decoratior instead of with waterfall
...
CURA-5744
2018-09-26 17:23:36 +02:00
Jaime van Kessel
b48adf5b3e
Typing fixes
...
CURA-5744
2018-09-24 17:37:06 +02:00
Jaime van Kessel
7360313ff7
Add LocalAuthServer test
...
This is to ensure that once we try to login, it actually attempts to start the local server
CURA-5744
2018-09-24 17:26:08 +02:00
Jaime van Kessel
1e5177a44f
Added unit tests for authorization service
...
CURA-5744
2018-09-24 17:04:20 +02:00