Skip to content

Commit 78573c6

Browse files
committed
2 parents fa97da3 + 4f5af1d commit 78573c6

File tree

3 files changed

+2
-45
lines changed

3 files changed

+2
-45
lines changed

tests/test_direct_s3_upload.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
import superannotate as sa
88

9-
sa.init(Path.home() / ".superannotate" / "config.json")
10-
119
TEST_PROJECT_NAME = "test_direct_s3_upload"
1210
S3_BUCKET = 'superannotate-python-sdk-test'
1311
S3_FOLDER = 'sample_project_vector'
@@ -42,39 +40,3 @@ def test_direct_s3_upload():
4240
on_s3.append(key)
4341

4442
assert len(on_s3) == sa.get_project_image_count(project)
45-
46-
47-
@pytest.mark.skipif(
48-
"AO_TEST_LEVEL" not in os.environ or
49-
os.environ["AO_TEST_LEVEL"] != "stress",
50-
reason="Requires env variable to be set"
51-
)
52-
def test_direct_s3_upload_stress():
53-
projects_found = sa.search_projects(
54-
TEST_PROJECT_NAME + " stress", return_metadata=True
55-
)
56-
for pr in projects_found:
57-
sa.delete_project(pr)
58-
59-
project = sa.create_project(TEST_PROJECT_NAME + " stress", "a", "Vector")
60-
61-
csv = (Path.home() /
62-
"hovnatan_aws.csv").read_text().splitlines()[1].split(",")
63-
64-
sa.upload_images_from_s3_bucket_to_project(
65-
project, csv[2], csv[3], S3_BUCKET, S3_FOLDER_STRESS
66-
)
67-
s3_client = boto3.client('s3')
68-
paginator = s3_client.get_paginator('list_objects_v2')
69-
response_iterator = paginator.paginate(
70-
Bucket=S3_BUCKET, Prefix=S3_FOLDER_STRESS
71-
)
72-
on_s3 = []
73-
for response in response_iterator:
74-
if 'Contents' in response:
75-
for object_data in response['Contents']:
76-
key = object_data['Key']
77-
if key[-4:] == ".jpg":
78-
on_s3.append(key)
79-
80-
assert len(on_s3) == sa.get_project_image_count(project)

tests/test_team_invite.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22

33
import superannotate as sa
44

5-
sa.init(Path.home() / ".superannotate" / "config.json")
6-
75

86
def test_team_invite():
97
try:
10-
sa.invite_contributor_to_team("hovnatan@supenotate.com")
8+
sa.invite_contributor_to_team("hovnatan@superannotate.com")
119
except sa.SABaseException as e:
12-
assert e.message == 'Couldn\'t invite to team. {"error":"User with hovnatan@supenotate.com email is already invited to this team."}'
10+
assert e.message == 'Couldn\'t invite to team. {"error":"User with hovnatan@superannotate.com email is already member of this team."}'
1311
else:
1412
assert False
15-
1613
# sa.delete_team_contributor_invitation(invite)
1714

1815
# print(sa.search_team_contributors())

tests/test_users_and_roles.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import superannotate as sa
44

5-
sa.init(Path.home() / ".superannotate" / "config.json")
6-
75
PROJECT_NAME = "test users and roles"
86

97

0 commit comments

Comments
 (0)