Remco Burema
77823a9c12
Fix more unit-tests II.
...
related to internal ticket CURA-11406
2024-02-15 16:01:32 +01:00
Remco Burema
58f8eae80c
Fix more unit-tests.
...
related to internal ticket CURA-11406
2024-02-15 15:45:49 +01:00
Remco Burema
831c72dbe5
Fix unit-tests.
...
related to internal ticket CURA-11406
2024-02-15 15:03:13 +01:00
Remco Burema
abe7c1bf7f
Search/replace Qt5->Qt6.
...
part of upgrading Qt to v6.2: CURA-8591
2021-12-28 14:46:02 +01:00
Ghostkeeper
677b64f068
Remove unnecessary import
...
We're not using this library any more now. Not even in the tests.
Contributes to issue CURA-8539.
2021-11-22 19:08:17 +01:00
Ghostkeeper
4b5d698325
Fix assertion of resulting profile via callback
...
Needs to work differently with the asynchronous workflow.
Contributes to issue CURA-8539.
2021-11-22 15:54:42 +01:00
Ghostkeeper
fbbf1427b3
Fix patching of getUserProfile
...
The actual profile is not necessary for this test. But this function always returns None and we shouldn't patch it to make it return something else.
Contributes to issue CURA-8539.
2021-11-22 15:52:24 +01:00
Ghostkeeper
c5e22c53cc
Fix checking return values in log-in/log-out flow test
...
Contributes to issue CURA-8539.
2021-11-22 15:48:29 +01:00
Ghostkeeper
a8a41381cb
Remove test simulating request error in user profile
...
We're no longer generating that error. We're generating a QNetworkReply with a built-in error code and those errors are handled the same way as the failed requests tested above.
Contributes to issue CURA-8539.
2021-11-22 15:14:05 +01:00
Ghostkeeper
4139350496
Fix test checking for failure of refresh token to reset auth
...
It was previously mocking some return values that should now get returned via callbacks. And it was previously relying on a web service which might not connect at all.
Contributes to issue CURA-8539.
2021-11-22 15:11:35 +01:00
Ghostkeeper
3236be1c20
Also mock POST command and a failed response
...
Otherwise it'll end up using actual internet connections anyway. Not what we want.
Contributes to issue CURA-8539.
2021-11-22 14:45:44 +01:00
Ghostkeeper
e8f9e92f02
Simulate an actual expired authentication token
...
The test should trigger the refresh token to be used to get a new authentication token.
Contributes to issue CURA-8539.
2021-11-22 14:26:15 +01:00
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