Skip to content
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

CVAT_server. Test for "Project updated time". #3953

Conversation

dvkruchinin
Copy link
Contributor

Related #3814

Motivation and context

Test for CVAT_server.

How has this been tested?

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT


db_project = create_db_project(project_data)
create_dummy_db_tasks(cls, db_project)
cls.projects = db_project
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cls.project = db_project?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Fixed.

response = self.client.delete('/api/v1/tasks/{}'.format(tid), format="json")
return response

def _get_tasks_count(self, project):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will recommend delete the function and use the code as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

self._check_tasks_count(project, 4)
self._check_xml(pid, user, 4)

response = self._run_api_v1_tasks_id_delete(self._get_tasks_count(project)[0], self.admin)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.project.id instead of self._get_tasks_count(project)[0]?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But here the removal of the task from the project is used. The project ID is not needed here.
Replaced by

        tasks_id = [task.id for task in project.tasks.all()]
        response = self._run_api_v1_tasks_id_delete(tasks_id[0], self.admin)

@nmanovic nmanovic merged commit c820723 into cvat-ai:develop Dec 1, 2021
sarikaya added a commit to roboduels/cvat that referenced this pull request Dec 4, 2021
…o openvinotoolkit-develop

* 'develop' of https://github.com/openvinotoolkit/cvat: (181 commits)
  Cypress. Update case 105. Add check "Google cloud storage" provider fields. (cvat-ai#3980)
  Cypress. Fix case 108 for Firefox. (cvat-ai#3981)
  update project section (cvat-ai#3979)
  Cypress. Test "Rotated bounding boxes" (cvat-ai#3961)
  Issue deleting (cvat-ai#3952)
  Remove key_file_path field (cvat-ai#3959)
  update the doc for change default hostname or port (cvat-ai#3915)
  CVAT_server. Test for "Project updated time". (cvat-ai#3953)
  fix: cvat/requirements/base.txt to reduce vulnerabilities (cvat-ai#3970)
  Fix notification (cvat-ai#3960)
  Update documentation for China users (cvat-ai#3946)
  Support GCS (cvat-ai#3919)
  Cypress. Update the test for check issue 3810. (cvat-ai#3900)
  Update the documentation about the smooth image option (cvat-ai#3947)
  Project tasks pagination (cvat-ai#3910)
  Update documentation about review mode (cvat-ai#3944)
  Preserve the order of the label attributes in the object item details. (cvat-ai#3945)
  Added smooth image option (cvat-ai#3933)
  Fixed issue: autoborder points are visible for invisible shapes (cvat-ai#3931)
  Add FiftyOne to partners list (cvat-ai#3943)
  ...
sarikaya added a commit to roboduels/cvat that referenced this pull request Dec 4, 2021
* openvinotoolkit-develop: (181 commits)
  Cypress. Update case 105. Add check "Google cloud storage" provider fields. (cvat-ai#3980)
  Cypress. Fix case 108 for Firefox. (cvat-ai#3981)
  update project section (cvat-ai#3979)
  Cypress. Test "Rotated bounding boxes" (cvat-ai#3961)
  Issue deleting (cvat-ai#3952)
  Remove key_file_path field (cvat-ai#3959)
  update the doc for change default hostname or port (cvat-ai#3915)
  CVAT_server. Test for "Project updated time". (cvat-ai#3953)
  fix: cvat/requirements/base.txt to reduce vulnerabilities (cvat-ai#3970)
  Fix notification (cvat-ai#3960)
  Update documentation for China users (cvat-ai#3946)
  Support GCS (cvat-ai#3919)
  Cypress. Update the test for check issue 3810. (cvat-ai#3900)
  Update the documentation about the smooth image option (cvat-ai#3947)
  Project tasks pagination (cvat-ai#3910)
  Update documentation about review mode (cvat-ai#3944)
  Preserve the order of the label attributes in the object item details. (cvat-ai#3945)
  Added smooth image option (cvat-ai#3933)
  Fixed issue: autoborder points are visible for invisible shapes (cvat-ai#3931)
  Add FiftyOne to partners list (cvat-ai#3943)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants