Closed Bug 1405675 Opened 7 years ago Closed 7 years ago

switch to pytest for webapp

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

Details

Attachments

(5 files)

In bug #1361764, we switched most of Socorro from nose (and some other curious things) to pytest. That bug excluded the webapp for various reasons.

This probably involves three stages:

Stage 1:

* switching from django-nose to pytest-django
* changing the test scripts to use pytest instead of nose

Stage 2:

* going through all the test code and replacing nose things with pytest things

Stage 3:

* removing nose from the requirements

This bug covers switching the webapp from nose to pytest.
Grabbing this to do now. I've got most of stage 1 done now.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/70788695f00c5a564aa634bf5f48cf4f98be51b3
bug 1405675 - switch to pytest for webapp

This drops django-nose and adds pytest-django, sets up configuration for using
pytest to run webapp tests, adds some helpful comments, fixes a test, and
updates the relevant shell scripts.

https://github.com/mozilla-services/socorro/commit/0b3563b246cd3d1b8a2b2812eecde47319d373e1
Merge pull request #4027 from willkg/1405675-pytest-webapp

bug 1405675 - switch to pytest for webapp [no rush]
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/8a47efacb98c3510ce165a6203b077cd8efd122d
bug 1405675 - update crashstats/profiles/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/1ef7cda54830155399beace97e45627984eb5ac0
bug 1405675 - update crashstats/scrubber/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/be034852a977a33a9698c72c01611d9b1b8849b0
bug 1405675 - update crashstats/signature/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/7e51ba68957766d56ad04c9171f4ae22efed8a12
bug 1405675 - update crashstats/sources/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/94ec9089df65f795199f29702844c83e395279b7
bug 1405675 - update crashstats/status/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/c38b3640a28d4b7f9296f17c09fb690b453f0a78
bug 1405675 - update crashstats/supersearch/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/937f64913b635e057a0c4bc2c5ba4dcbc3cb5e45
bug 1405675 - update crashstats/symbols/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/5e733d1a6bd7060212199002008f0c3b3b94dfe1
bug 1405675 - update crashstats/tokens/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/ed8937e1f7e9c6db42601eec4197c95419299d03
bug 1405675 - update crashstats/topcrashers/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/5ebacaacc8f7f07de2209060ff42cba2fff94bc5
Merge pull request #4039 from willkg/1405675-pytest-4

bug 1405675 - update profile, scrubber, signature sources, status, supersearch, symbols, tokens, topcrashers to pytest [no rush]
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/76072e5c5d5a970f5606fffc5c2382257a073620
bug 1405675 - update crashstats/manage/tests/* to pytest

https://github.com/mozilla-services/socorro/commit/73e10e1937ad5b1d58d3b0939177a28b453b0231
Merge pull request #4038 from willkg/1405675-pytest-3

bug 1405675 - update crashstats/manage/tests/* to pytest [no rush]
Last thing to do here is remove nose.
Bah. Can't remove nose because the crontabber tests all subclass crontabber's IntegrationTestCaseBase:

https://github.com/mozilla/crontabber/blob/master/crontabber/tests/base.py#L101

and that uses nose.

Possible options:

1. fix crontabber so we can use IntegrationTestCaseBase without nose -- that's definitely doable

2. rewrite IntegrationTestCaseBase in socorro without nose -- also doable and probably a copy/paste effort with some minor code changes

I wrote up bug #1409492 to cover figuring that out and finally removing nose.

Marking this as FIXED now.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/a0395520c1f671efec6205e76bbc0771ac02419b
fixes bug 1405675 - remove last vestiges of nose

* remove nose from requirements and setup.py
* remove mentions of nose in documentation
* pull in crontabber's TestCaseBase and IntegrationTestCaseBase and de-nosify
  them

https://github.com/mozilla-services/socorro/commit/c02f5900760c91d904efacf324407c35b4618870
Merge pull request #4057 from willkg/1405675-remove-nose

fixes bug 1405675 - remove last vestiges of nose [no rush]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: