-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from notoraptor/cw-477-clean-old-user-dict-fu…
…nctions [CW-477] Nettoyer les anciennes fonctions de user dict
- Loading branch information
Showing
16 changed files
with
113 additions
and
702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,38 +89,3 @@ def unauthorized_mtclient_00(invalid_config_00, db_with_fake_data): | |
@pytest.fixture | ||
def unauthorized_mtclient_01(invalid_config_01, db_with_fake_data): | ||
return clockwork_tools.client.ClockworkToolsClient(**invalid_config_01) | ||
|
||
|
||
""" | ||
There is a test called `test_jobs_user_dict_update` in "test_mt_jobs.py" | ||
and it requires a particular set of text fixtures compared to the other | ||
tests from the same file. Its fixture `mtclient_student01` comes from "conftest.py" | ||
in the same directory, which itself refers to a particular job that was | ||
hardcoded to be inserted in the database (opposed to being inserted by "fake_data.json"). | ||
This is because we require additional permissions in order to modify the "user" | ||
portion of a job in the database, which means that the usual test fixture | ||
`mtclient(config, db_with_fake_data)` from "conftest.py" doesn't satisfy the requirements. | ||
There is no guarantee that this `mtclient` fixture would indeed have any of | ||
its own jobs present in the "fake_data.json" used to populate the database initially. | ||
That explains the acrobatics done in the file "insert_hardcoded_values.py". | ||
""" | ||
|
||
|
||
@pytest.fixture | ||
def mtclient_student01(db_with_fake_data): | ||
""" | ||
This is a little too "hardcoded" in terms of featuring | ||
data straight from fake_data.json added manually here, | ||
but we need something like that to test `jobs_user_dict_update`. | ||
See more detailed explanation above in the source file. | ||
""" | ||
return clockwork_tools.client.ClockworkToolsClient( | ||
**{ | ||
"host": os.environ["clockwork_tools_test_HOST"], | ||
"port": os.environ["clockwork_tools_test_PORT"], | ||
"email": "[email protected]", | ||
"clockwork_api_key": "000aaa01", | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.