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))
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)
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)