Skip to content
Snippets Groups Projects
Commit 8ea40eca authored by robinwilliam.hundt's avatar robinwilliam.hundt
Browse files

Fixed randomly failing subscription test

The issue was that
```python
	 response = client.post(
            f'/api/feedback/', {
                "score": 23,
                "of_submission": response.data['submission']['pk'],
                "feedback_lines": {
                    2: {"text": "< some string >"},
                    3: {"text": "< some string >"}
                }
            }
        )
        self.assertEqual(status.HTTP_201_CREATED, response.status_code)
```
would sometimes get the one submission that only had 2 lines (since submission distribution hasn't been randomized for long, this issue didn't come up earlier) and thus fail as it should.
I changed the commented line to 1 and 2 in the POST. This should fix the issue.
parent b4ff9153
No related branches found
No related tags found
1 merge request!83Fix subscription list automatic login statistics
Pipeline #
...@@ -315,8 +315,8 @@ class TestApiEndpoints(APITestCase): ...@@ -315,8 +315,8 @@ class TestApiEndpoints(APITestCase):
"score": 23, "score": 23,
"of_submission": response.data['submission']['pk'], "of_submission": response.data['submission']['pk'],
"feedback_lines": { "feedback_lines": {
2: {"text": "< some string >"}, 1: {"text": "< some string >"},
3: {"text": "< some string >"} 2: {"text": "< some string >"}
} }
} }
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment