-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edited .github/workflows/buildandtestpy~aqsapi.yml to address workflo…
…w issues
- Loading branch information
1 parent
3716766
commit de84467
Showing
4 changed files
with
42 additions
and
11 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
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,38 @@ | ||
from os import environ, getcwd | ||
from os.path import abspath, exists | ||
from sys import path | ||
|
||
import pytest | ||
|
||
import pyaqsapi.metadatafunctions as metadatafunctions | ||
from pyaqsapi.helperfunctions import aqs_credentials | ||
|
||
@pytest.fixture | ||
def setuppyaqsapi(autouse=True): | ||
# print(f"the current working directory is: {getcwd()}") | ||
if exists("./dev/local.py"): | ||
# the following should only execute if the file ./dev/local.py exists | ||
# under the project root folder. This file should not exist on the git | ||
# repostiory or in the final package. local looads the AQS user | ||
# credentials for testing | ||
path.append(abspath("./dev")) | ||
import local | ||
|
||
AQSuser, AQSkey = local.setuppyaqsapitest() | ||
aqs_credentials(username=AQSuser, key=AQSkey) | ||
else: | ||
# get the credential information from environment variables if using | ||
# github actions | ||
AQSuser = environ.get("AQSuser") | ||
assert AQSuser is not None | ||
AQSkey = environ.get("AQSkey") | ||
assert AQSkey is not None | ||
aqs_credentials(username=AQSuser, key=AQSkey) | ||
|
||
|
||
def test_aqs_knownissues(setuppyaqsapi): | ||
assert metadatafunctions.aqs_knownissues(return_header=True).get_status_code() == "200" | ||
|
||
|
||
def test_aqs_revisionhistory(setuppyaqsapi): | ||
assert metadatafunctions.aqs_revisionhistory(return_header=True).get_status_code() == "200" |