-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore/trust integration tests (#370)
* adding trustedactivities integration tests * styling * Update build.yml * adding get-all integration test case with optional params * re-running check after merging mock-server service
- Loading branch information
1 parent
9925d24
commit a895e2b
Showing
2 changed files
with
40 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import pytest | ||
from tests.integration.conftest import assert_successful_response | ||
|
||
|
||
@pytest.mark.integration | ||
class TestTrustedActivities: | ||
@pytest.fixture(scope="module") | ||
def trusted_activity(self, connection): | ||
return connection.trustedactivities.create("DOMAIN", "test.com") | ||
|
||
def test_get_all_trusted_activities( | ||
self, connection, | ||
): | ||
page_gen = connection.trustedactivities.get_all() | ||
for response in page_gen: | ||
assert_successful_response(response) | ||
break | ||
|
||
def test_get_all_trusted_activities_with_optional_params( | ||
self, connection, | ||
): | ||
page_gen = connection.trustedactivities.get_all(type="DOMAIN", page_size=1) | ||
for response in page_gen: | ||
assert_successful_response(response) | ||
break | ||
|
||
def test_get_trusted_activity(self, connection, trusted_activity): | ||
response = connection.trustedactivities.get(trusted_activity["resourceId"]) | ||
assert_successful_response(response) | ||
|
||
def test_update_trusted_activity(self, connection, trusted_activity): | ||
response = connection.trustedactivities.update( | ||
trusted_activity["resourceId"], description="integration test case" | ||
) | ||
assert_successful_response(response) | ||
|
||
def test_delete_trusted_activity(self, connection, trusted_activity): | ||
response = connection.trustedactivities.delete(trusted_activity["resourceId"]) | ||
assert_successful_response(response) |