-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adjust docker-compose and sync rcra profile url parameters * add RCRAInfo Environment to celery worker and beat configs * use emanifest package new method of initiation * remove sync method from RcraProfile model * use RcraProfileServiceError to control what exceptions are raised from service module * introduce SiteServiceError exception class * add regrassion tests showing RcrainfoService sets state in __init__ by environment
- Loading branch information
1 parent
cbabb54
commit e48fdb2
Showing
13 changed files
with
111 additions
and
55 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import emanifest | ||
import pytest | ||
|
||
from apps.core.services import RcrainfoService | ||
|
||
|
||
class TestRcrainfoService: | ||
"""Tests the for the RcrainfoService class""" | ||
|
||
@pytest.fixture | ||
def user(self, user_factory): | ||
return user_factory() | ||
|
||
def test_rcrainfo_inits_to_correct_environment(self, user): | ||
rcrainfo = RcrainfoService(api_username=user.username, rcrainfo_env="preprod") | ||
assert rcrainfo.rcrainfo_env == "preprod" | ||
|
||
def test_rcrainfo_inits_base_url_by_env(self, user): | ||
rcrainfo_preprod = RcrainfoService(api_username=user.username, rcrainfo_env="preprod") | ||
assert rcrainfo_preprod.base_url == emanifest.RCRAINFO_PREPROD | ||
rcrainfo_prod = RcrainfoService(api_username=user.username, rcrainfo_env="prod") | ||
assert rcrainfo_prod.base_url == emanifest.RCRAINFO_PROD |
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
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