Skip to content

Commit

Permalink
CI: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Licari committed Mar 9, 2024
1 parent 7a1ddaf commit fa0d434
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Run tests
working-directory: ./api
run: |
python3 -m unittest discover
python3 -m unittest discover -p 'test_*.py'
build-and-push-image:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion api/api/services/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .captcha import captcha_verify
from .database import DatabaseSingleton
from .rate_limit import RateLimitStrategy, Strategy
from .token import Token
Expand Down
2 changes: 0 additions & 2 deletions api/api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from .const import CHAIN_NAMES
from .services import RateLimitStrategy

# from .utils import get_chain_name

load_dotenv()

rate_limit_strategy = RateLimitStrategy()
Expand Down
2 changes: 1 addition & 1 deletion api/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _mock(self, env_variables=None):
self.patchers = [
mock.patch('api.routes.claim_native', self.mock_claim_native),
mock.patch('api.routes.claim_token', self.mock_claim_erc20),
mock.patch('api.services.captcha_verify', return_value=True),
mock.patch('api.services.validator.captcha_verify', return_value=True),
mock.patch('api.api.print_info', return_value=None)
]
if env_variables:
Expand Down
4 changes: 2 additions & 2 deletions api/tests/temp_env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
'FAUCET_CHAIN_ID': str(FAUCET_CHAIN_ID),
'FAUCET_PRIVATE_KEY': token_bytes(32).hex(),
'FAUCET_RATE_LIMIT_TIME_LIMIT_SECONDS': '10',
# 'FAUCET_DATABASE_URI': 'sqlite://', # run in-memory
'FAUCET_DATABASE_URI': 'sqlite:///test.db',
'FAUCET_DATABASE_URI': 'sqlite://', # run in-memory
# 'FAUCET_DATABASE_URI': 'sqlite:///test.db',
'CAPTCHA_SECRET_KEY': CAPTCHA_TEST_SECRET_KEY
}

Expand Down

0 comments on commit fa0d434

Please sign in to comment.