-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55913f0
commit 2e15025
Showing
12 changed files
with
220 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
-r api_client.txt | ||
|
||
attrs >= 21.4.0 | ||
packaging >= 21.3 | ||
Pillow >= 9.0.1 | ||
tqdm >= 4.64.0 | ||
tuspy == 0.2.5 # have it pinned, because SDK has lots of patched TUS code | ||
typing_extensions >= 4.2.0 | ||
typing_extensions >= 4.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright (C) 2022 CVAT.ai Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
|
||
from http import HTTPStatus | ||
import pytest | ||
from shared.utils.config import make_api_client | ||
|
||
|
||
@pytest.mark.usefixtures('dontchangedb') | ||
class TestGetServer: | ||
def test_can_retrieve_about_unauthorized(self): | ||
with make_api_client(user=None, password=None) as api_client: | ||
(data, response) = api_client.server_api.retrieve_about() | ||
|
||
assert response.status == HTTPStatus.OK | ||
assert data.version | ||
|
||
def test_can_retrieve_formats(self, admin_user: str): | ||
with make_api_client(admin_user) as api_client: | ||
(data, response) = api_client.server_api.retrieve_annotation_formats() | ||
|
||
assert response.status == HTTPStatus.OK | ||
assert len(data.importers) != 0 | ||
assert len(data.exporters) != 0 | ||
|
||
|
||
@pytest.mark.usefixtures('dontchangedb') | ||
class TestGetSchema: | ||
def test_can_get_schema_unauthorized(self): | ||
with make_api_client(user=None, password=None) as api_client: | ||
(data, response) = api_client.schema_api.retrieve() | ||
|
||
assert response.status == HTTPStatus.OK | ||
assert data |
Oops, something went wrong.