-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for content type header #4345
Conversation
@Marishka17 , could we extend https://github.com/openvinotoolkit/cvat/tree/develop/tests/rest_api? I really don't want to touch old tests anymore if they are working. |
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.
@Marishka17 , LGTM. I would rename test_data.py to test_tasks.py (or test_0010_tasks.py if we decide to keep numbers in the file name).
@kirill-sizov , please look and advise. |
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.
We try to avoid using hardcoded data (usernames, ids, etc.) in tests.
But even though this test assumes that tasks with ids 1, 5, 6 will never change Content-Type
and that user1
will always see them, I think this is a reasonable limitation because it is difficult to change this information (except for example by deleting a task).
For sure it's easy to avoid this limitation with creating another one JSON file headers.json
, but I suggest to delay this idea till it will be really needed.
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.
LGTM
Motivation and context
How has this been tested?
Checklist
develop
branch- [ ] I have added a description of my changes into CHANGELOG file- [ ] I have updated the documentation accordingly- [ ] I have linked related issues (read github docs)- [ ] I have increased versions of npm packages if it is necessary (cvat-canvas,cvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
- [ ] I have updated the license header for each file (see an example below)