示例#1
0
 def test_blob_get_all_by_workspace_return_collection_of_blob_from_user(
         self):
     # Act
     result = Blob.get_all_by_workspace(self.fixture.workspace_1)
     # Assert
     self.assertTrue(
         all(item.user_id == str(self.fixture.workspace_1.owner)
             for item in result))
示例#2
0
def get_all_by_workspace(workspace, user):
    """ Get all data that belong to the workspace.

    Args:
        workspace:

    Returns:

    """
    return Blob.get_all_by_workspace(workspace)
示例#3
0
 def test_blob_get_all_by_workspace_return_empty_collection_of_blob_from_empty_workspace(
         self):
     # Act
     result = Blob.get_all_by_workspace(self.fixture.workspace_without_data)
     # Assert
     self.assertTrue(result.count() == 0)