Skip to content

Commit e51fe1d

Browse files
committed
Fix: add test for instantiation of contrib class
1 parent fb9323a commit e51fe1d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from pyosmeta.contributors import ProcessContributors
2+
from pyosmeta.github_api import GitHubAPI
3+
4+
5+
def test_init(mocker):
6+
"""Test that the ProcessContributors object instantiates as
7+
expected"""
8+
9+
# Create a mock GitHubAPI object
10+
github_api_mock = mocker.MagicMock(spec=GitHubAPI)
11+
json_files = ["file1.json", "file2.json"]
12+
13+
process_contributors = ProcessContributors(github_api_mock, json_files)
14+
15+
assert process_contributors.github_api == github_api_mock
16+
assert process_contributors.json_files == json_files

0 commit comments

Comments
 (0)