Skip to content

Commit

Permalink
Merge pull request #1 from KelDakroury/master
Browse files Browse the repository at this point in the history
Create codacy.yml
  • Loading branch information
thecarrot123 authored Jul 27, 2024
2 parents b3489ab + 0b81b57 commit d939dd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ jobs:
run: poetry run flake8 app tests --max-complexity 8
- name: Check security issues
run: poetry run bandit -r app/
- name: Run mutation tests
run: poetry run mutmut run --paths-to-mutate app
8 changes: 6 additions & 2 deletions tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import re
from unittest.mock import MagicMock, patch
import pytest

from dotenv import load_dotenv

Expand All @@ -19,8 +20,9 @@ def test_api_token():
for the bot to authenticate with Telegram.
"""
token = os.getenv("TELEGRAM_TOKEN")
if token is None:
pytest.skip("TELEGRAM_TOKEN is not set in the environment")
assert token is not None
assert TOKEN == token


def test_database_url():
Expand All @@ -30,8 +32,10 @@ def test_database_url():
can successfully connect to the expected database.
"""
url = os.getenv("DATABASE_URL")
if url is None:
pytest.skip("url is not set in the environment")
assert url is not None
assert DATABASE_URL == url



def test_daily_reminder_start():
Expand Down

0 comments on commit d939dd1

Please sign in to comment.