Skip to content

Commit

Permalink
Test case for repo creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Mar 19, 2015
1 parent 2ffe2a7 commit 9862713
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/test_shed.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,21 @@ class ShedTestCase(CliTestCase):

@skip_unless_environ("TEST_TOOL_SHED_API_KEY")
def test_shed(self):
shed_url = os.environ.get("TEST_TOOL_SHED_URL", "http://localhost:9009")
shed_url = os.environ.get("TEST_TOOL_SHED_URL",
"http://localhost:9009")
shed_api_key = os.environ.get("TEST_TOOL_SHED_API_KEY")
tsi = toolshed.ToolShedInstance(shed_url, key=shed_api_key)
owner = username(tsi)
name = "planemotestrepo%d" % random.randint(0, 1000000)
with self._isolate():
shed_yml_contents = SHED_TEMPLATE.safe_substitute(
owner=owner,
name="planemotestrepo%d" % random.randint(0, 1000000),
name=name,
)
open(".shed.yml", "w").write(shed_yml_contents)
# init_cmd = ["shed_repo_create", "--shed_key", shed_api_key, "--shed_target", shed_url]
# self._check_exit_code(init_cmd)
init_cmd = [
"shed_repo_create",
"--shed_key", shed_api_key,
"--shed_target", shed_url
]
self._check_exit_code(init_cmd)

0 comments on commit 9862713

Please sign in to comment.