-
Notifications
You must be signed in to change notification settings - Fork 30
feat: move tests to pytest #1042
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1042 +/- ##
==========================================
+ Coverage 99.76% 99.76% +<.01%
==========================================
Files 55 55
Lines 8820 8823 +3
==========================================
+ Hits 8799 8802 +3
Misses 21 21
Continue to review full report at Codecov.
|
bf49f0c
to
77348cb
Compare
autopush/tests/test_router.py
Outdated
eq_(exc.status_code, 201) | ||
eq_(len(self.metrics.increment.mock_calls), 0) | ||
ok_("Location" in exc.headers) | ||
assert exc, RouterResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm noticing a few of these asserts (originally ok_s) are incorrect. This and a couple others should be assert isinstance(exc, RouterResponse). A couple "assert status.status_code, 201" below.
Logged a separate issue here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I had to correct a few of those. Good catch on these. I'll clean them up.
autopush/conftest.py
Outdated
@@ -0,0 +1,11 @@ | |||
from autopush.tests import setUp, tearDown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move conftest into tests/ ? (it usually lives there, in my experience)
Issue #1039
General sweep of tests to make things "pytest" compliant. This means switching nosetool calls for their assert/pytest primatives.
Note, there were a few tests in test_cryptokey that were invalid and have been fixed because of this.
In addition, some light type correction was made where appropriate.
(Also note: this PR does not fully close #1039. tox and other functions still use nose.)