-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Mock Test (pulled out to new file) Skip certain files for testing.
- Loading branch information
Showing
4 changed files
with
39 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[run] | ||
source = tests | ||
omit = __init__.py, mock.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# pylint: disable=invalid-name | ||
# pylint: disable=missing-function-docstring | ||
import pytest | ||
|
||
pytestmark = pytest.mark.skip("Class created for testing purposes only.") | ||
|
||
|
||
class MockResponse: | ||
'''Class to mock the behavior and results of the requests.get function | ||
in the findGamesByDate function. | ||
''' | ||
|
||
def __init__(self, data, status_code): | ||
'''Fill the class with the required data for a response''' | ||
self.data = data | ||
self.code = status_code | ||
|
||
def read(self): | ||
return self.data | ||
|
||
def json(self): | ||
return self.data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters