Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kgashok authored Jun 19, 2022
2 parents cdc7313 + f09e34a commit 3cb82e6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
11 changes: 11 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Included this file at the root level for future testing scenarios
# as per https://stackoverflow.com/a/34520971/307454
# sample fixture code provided below
"""
import pytest
@pytest.fixture
def input_value():
input = 39
return input
"""
4 changes: 4 additions & 0 deletions first_timers/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def updateDB(all_issues, db_path):
is_flag=True,
help='Run in debug mode (does not tweet).')
def run(only_save, db_path, create, creds_path, debug):
"""The function that gets repetitively called via cron.
- Updates the DB file with new issues
- Sends out corresponding tweets for those new issues
"""
dbExists = os.path.exists(db_path)
if not dbExists and not create:
click.secho('DB file does not exist and argument'
Expand Down
5 changes: 4 additions & 1 deletion tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def test_fetcher():
"""Test whether first_timer_issues are getting picked up."""
issue_label = ('good first issue')
new_issues = first_timers.get_first_timer_issues(issue_label)

assert new_issues


Expand All @@ -27,6 +26,10 @@ def test_get_fresh():


def test_humanize_url():
"""Test whether the humanization of api endpoint works.
Please see https://en.wikipedia.org/wiki/URI_normalization
"""

api_url = "https://api.github.com/repos/tidusjar/NZBDash/issues/53"
human_url = 'https://github.com/tidusjar/NZBDash/issues/53'
assert first_timers.humanize_url(api_url) == human_url

0 comments on commit 3cb82e6

Please sign in to comment.