Skip to content

Conversation

@piotrWichlinskiSoftwaremind
Copy link
Collaborator

No description provided.

@piotrWichlinskiSoftwaremind piotrWichlinskiSoftwaremind force-pushed the share_form_change branch 2 times, most recently from 53371aa to ce4c7ef Compare August 23, 2022 11:03
elif stat_response.status.code == cs3_code.CODE_NOT_FOUND:
raise ResourceNotFoundError("Resource not found")
else:
self._handle_error(stat_response)
Copy link
Collaborator

Choose a reason for hiding this comment

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

new line


def get_user(self, idp, opaque_id):
user_info = self.get_user_info(idp, opaque_id)
if not bool(user_info) and self.config['enable_ocm']:
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need for explicit conversion to bool


file_path = FileUtils.remove_drives_names(file_path)
file_path = ShareUtils.purify_file_path(file_path, self.config.client_id)
shares = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

can be
shares = [ShareUtils.get_share_info(share) for share in all_shares_list]


@skip
class TestCs3OcmShareApi(TestCase):
class TestCs3ShareApi(TestCase):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the name change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it shouldn't, I've changed it back

from unittest import TestCase
from cs3api4lab.exception.exceptions import ShareError, ResourceNotFoundError

from cs3api4lab.exception.exceptions import *
Copy link
Collaborator

Choose a reason for hiding this comment

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

wildcard imports should be avoided, instead:
from cs3api4lab.exception.exceptions import ShareError, ResourceNotFoundError, ShareNotFoundError

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

"""
This tests checks if share_api.get() single share raises an exception when incorrect id is given
"""
random_id = self.get_random_suffix()
Copy link
Collaborator

Choose a reason for hiding this comment

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

can just be some made up id, doesn't have to be random

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

"""This test if share_api.remove raises an error when share doesn't exist"""

with self.assertRaises(Exception) as context:
self.share_api.remove(self.get_random_suffix())
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

"""

try:
self.file_name = self.file_path + self.get_random_suffix()
Copy link
Collaborator

Choose a reason for hiding this comment

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

same

@piotrWichlinskiSoftwaremind piotrWichlinskiSoftwaremind force-pushed the share_form_change branch 3 times, most recently from b93678a to 133ad93 Compare August 23, 2022 13:36
@piotrWichlinskiSoftwaremind piotrWichlinskiSoftwaremind force-pushed the share_form_change branch 2 times, most recently from 646b2d2 to 0a4d007 Compare September 13, 2022 14:01
@piotrWichlinskiSoftwaremind piotrWichlinskiSoftwaremind force-pushed the share_form_change branch 3 times, most recently from 77518b8 to 52edf23 Compare September 16, 2022 12:35
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.

4 participants