Skip to content

Commit

Permalink
Fix type annotation of test_0020_basic_repository_dependencies.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Oct 23, 2023
1 parent 6cd3d1e commit eff0ff4
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from ..base import common
from ..base.api import skip_if_api_v2
from ..base.twilltestcase import (
common,
ShedTwillTestCase,
)
from ..base.twilltestcase import ShedTwillTestCase

column_maker_repository_name = "column_maker_0020"
column_maker_repository_description = "A flexible aligner."
Expand Down Expand Up @@ -30,6 +28,7 @@ def test_0005_create_category(self):
def test_0010_create_column_maker_repository(self):
"""Create and populate column_maker_0020."""
category = self.populator.get_category_with_name("Test 0020 Basic Repository Dependencies")
assert category
self.login(email=common.test_user_1_email, username=common.test_user_1_name)
column_maker_repository = self.get_or_create_repository(
name=column_maker_repository_name,
Expand All @@ -39,11 +38,13 @@ def test_0010_create_column_maker_repository(self):
category=category,
strings_displayed=[],
)
assert column_maker_repository
self.commit_tar_to_repository(column_maker_repository, "column_maker/column_maker.tar")

def test_0020_create_emboss_5_repository_and_upload_files(self):
"""Create and populate the emboss_5_0020 repository."""
category = self.populator.get_category_with_name("Test 0020 Basic Repository Dependencies")
assert category
repository = self.get_or_create_repository(
name=emboss_repository_name,
description=emboss_repository_description,
Expand All @@ -52,14 +53,17 @@ def test_0020_create_emboss_5_repository_and_upload_files(self):
category=category,
strings_displayed=[],
)
assert repository
self.commit_tar_to_repository(repository, "emboss/emboss.tar")

def test_0025_generate_and_upload_repository_dependencies_xml(self):
"""Generate and upload the repository_dependencies.xml file"""
repository = self._get_repository_by_name_and_owner(emboss_repository_name, common.test_user_1_name)
assert repository
column_maker_repository = self._get_repository_by_name_and_owner(
column_maker_repository_name, common.test_user_1_name
)
assert column_maker_repository
repository_dependencies_path = self.generate_temp_path("test_0020", additional_paths=["emboss", "5"])
repository_tuple = (
self.url,
Expand All @@ -75,9 +79,11 @@ def test_0025_generate_and_upload_repository_dependencies_xml(self):
def test_0030_verify_emboss_5_dependencies(self):
"""Verify that the emboss_5 repository now depends on the emboss_datatypes repository with correct name, owner, and changeset revision."""
repository = self._get_repository_by_name_and_owner(emboss_repository_name, common.test_user_1_name)
assert repository
column_maker_repository = self._get_repository_by_name_and_owner(
column_maker_repository_name, common.test_user_1_name
)
assert column_maker_repository
changeset_revision = self.get_repository_tip(column_maker_repository)
strings_displayed = [
"Tool dependencies",
Expand All @@ -93,8 +99,10 @@ def test_0030_verify_emboss_5_dependencies(self):
def test_0040_verify_repository_metadata(self):
"""Verify that resetting the metadata does not change it."""
emboss_repository = self._get_repository_by_name_and_owner(emboss_repository_name, common.test_user_1_name)
assert emboss_repository
column_maker_repository = self._get_repository_by_name_and_owner(
column_maker_repository_name, common.test_user_1_name
)
assert column_maker_repository
self.verify_unchanged_repository_metadata(emboss_repository)
self.verify_unchanged_repository_metadata(column_maker_repository)

0 comments on commit eff0ff4

Please sign in to comment.