test: fix team tests for multiple courses - #32638
Conversation
This reverts commit ad3b561. Follow-up commit will convert these helpers to actual tests so they are run.
kdmccormick
left a comment
There was a problem hiding this comment.
Looks good, and thank you!
Non-blocking, but consider adding the link to the original commit or PR (#10804) to your commit message, just to tie things together more for those that weren't in the Slack thread.
| # Check that list of user teams in course two is still empty | ||
| course_two_teams_url = reverse('teams_dashboard', args=[course_two.id]) | ||
| response = self.client.get(course_two_teams_url) | ||
| self.assertContains(response, '"teams": {"next": null, "previous": null, "count": 0') |
There was a problem hiding this comment.
These are doing substring-matching on JSON, right? It would be more robust to parse the JSON and query it, but up to you. (More important to restore these than to make them totally robust.)
There was a problem hiding this comment.
I'm leaving this for the next person who wants to improve. Agree it would be nice.
The original tests looked like helpers, but we are guessing that they were supposed to be tests. Additionally, one test had a small bug as written. It would be more resilient to actually parse the JSON, but that work is being left for a later time. For now, it works, but is not resilient. The original PR can be found here: #10804
76ae069 to
0a4bc11
Compare
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
|
2U Release Notice: This PR has been deployed to the edX production environment. |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
Description
Note to reviewer: Reviewing the test commit 0ccf15d makes it easier to see what changes I made.