mirror of
https://github.com/Findus23/new-github-changelog-generator.git
synced 2024-08-27 19:52:18 +02:00
21 lines
478 B
Python
21 lines
478 B
Python
import json
|
|
from datetime import datetime
|
|
|
|
import pytest
|
|
|
|
from generator import Issue
|
|
|
|
|
|
def load_json(path):
|
|
with open(path) as file:
|
|
return json.load(file)
|
|
|
|
|
|
@pytest.fixture
|
|
def issues(request):
|
|
issues = []
|
|
for i in load_json(request.fspath.join('../api_responses/').join("issues.json")):
|
|
issue = Issue(i)
|
|
issue.compare_close_date(datetime.strptime("2019-01-25 00:00:00", "%Y-%m-%d %H:%M:%S"))
|
|
issues.append(issue)
|
|
return issues
|