Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d5336b37
authored
Sep 03, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add doctest to connect_command_template_validator
parent
9e888e97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
circle/dashboard/validators.py
+12
-0
No files found.
circle/dashboard/validators.py
View file @
d5336b37
...
...
@@ -34,6 +34,18 @@ def domain_validator(value):
def
connect_command_template_validator
(
value
):
"""Validate value as a connect command template.
>>> try: connect_command_template_validator("
%(host)
s")
... except ValidationError as e: print e
...
>>> connect_command_template_validator("
%(host)
s")
>>> try: connect_command_template_validator("
%(host)
s
%
s")
... except ValidationError as e: print e
...
[u'Invalid template string.']
"""
try
:
value
%
{
'username'
:
"uname"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment