This change triggers a cascade of updates and in some cases triggers a sync. The sync trigger also triggers an update of the account permissions which crashes because the HttpRequestManager can't be started on a thread. We shouldn't make HTTP requests from our tests anyway so mock this away.
Contributes to issue CURA-9220.
Changing the log-in state causes additional requests to be made to get information from the account. Previously this wasn't a problem because the information was only obtained from other classes such as the DigitalLibrary to get information on how many library projects the user can make. But now that there are triggers in the Account class itself, those triggers get triggered. It'd make additional requests to the account server. We don't want the tests to make such requests.
Contributes to issue CURA-9220.
We're changing the validation function of metadata for containers to require the type and name parameters. That needs to be reflected in the tests.
Contributes to issue CURA-3Z4.
Conflicts:
cura/PlatformPhysics.py -> Removed shapely on master, while QTimer import got updated to Qt6.
plugins/Toolbox -> Entire folder is deleted in master, but it was updated to Qt6 here. This can all be removed.
The UserProfile is being stored in the account with a simple assignment, and these are just some property getters with a fallback. I don't think we need to test that.
The actual getting of a user profile (and whether that returns correctly when logged out and such) is already tested as part of the OAuth flow where that code lives.
Contributes to issue CURA-8539.
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.
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.
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.
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.
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.