Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stylize prompt for new project and tags #310

Merged
merged 7 commits into from
Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Tests] the passed project must be a string,
not a list
  • Loading branch information
MinchinWeb committed Sep 6, 2019
commit ec79b253085fd2ef7502bf85afbd3b20b108437b
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def test_confirm_tags_reject_raises_abort(confirm):
tags = ['c']
watson_tags = ['a', 'b']
with pytest.raises(Abort):
confirm_project(tags, watson_tags)
confirm_project(tags[0], watson_tags)


# build_csv
Expand Down
3 changes: 3 additions & 0 deletions watson/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
def confirm_project(project, watson_projects):
"""
Ask user to confirm creation of a new project
'project' must be a string
'watson_projects' must be an interable.
Returns True on accept and raises click.exceptions.Abort on reject
"""
if project not in watson_projects:
Expand All @@ -44,6 +46,7 @@ def confirm_project(project, watson_projects):
def confirm_tags(tags, watson_tags):
"""
Ask user to confirm creation of new tags (each separately)
Both 'tags' and 'watson_tags" must be iterables.
Returns True if all accepted and raises click.exceptions.Abort on reject
"""
for tag in tags:
Expand Down