🎡 add unit tests for github.py

add unittests for our github api calls
This commit is contained in:
Michael Pöhn 2024-04-16 11:35:54 +02:00
parent 1b19293ab0
commit 44b0af933d
No known key found for this signature in database
GPG key ID: 725F386C05529A5A
3 changed files with 175 additions and 3 deletions

View file

@ -85,7 +85,7 @@ class GithubApi:
with urllib.request.urlopen(req) as resp:
refs = json.load(resp)
for ref in refs:
r = ref['ref']
r = ref.get('ref', '')
if r.startswith('refs/tags/'):
tags.append(r[10:])
return tags