Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
corepost
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
nexlab
corepost
Commits
1b68675b
Commit
1b68675b
authored
Aug 30, 2011
by
Jacek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on BDD tests
parent
38cb1a57
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
2 deletions
+67
-2
steps.py
corepost/test/steps.py
+63
-0
setup.py
setup.py
+4
-2
No files found.
corepost/test/steps.py
0 → 100644
View file @
1b68675b
'''
Common Freshen BDD steps
@author: jacekf
'''
import
httplib2
from
freshen
import
*
#@UnusedWildImport
##################################
# BEFORE / AFTER
##################################
@
Before
def
setup
():
scc
.
processes
=
[]
@
After
def
cleanup
():
# shut down processes
for
process
in
scc
.
processes
:
process
.
terminate
()
##################################
# GIVEN
##################################
@
Given
(
"'(.+)' is running"
)
def
given_process_is_running
(
processname
):
pass
##################################
# WHEN
##################################
@
When
(
"^as user '(.+):(.+)' I (GET|DELETE) '(.+)'
\
s*$"
)
def
when_as_user_i_send_get_delete_to_url
(
user
,
passord
,
method
,
url
):
pass
@
When
(
"^as user '(.+):(.+)' I (POST|PUT) '(.+)' with '(.+)'
\
s*$"
)
def
when_as_user_i_send_post_put_to_url
(
user
,
password
,
method
,
url
,
params
):
pass
@
When
(
"^as user '(.+):(.+)' I (POST|PUT) '(.+)' (XML|JSON)
\
s*$"
)
def
when_as_user_i_send_post_put_xml_json_to_url
(
payload
,
user
,
passord
,
method
,
url
):
pass
##################################
# THEN
##################################
@
Then
(
"^I expect HTTP code
\
d+
\
s*$"
)
def
expect_http_code
(
code
):
pass
@
Then
(
"^I expect content contains
\
s*$"
)
def
expect_content
(
conntent
):
pass
@
Then
(
"^I expect header '(.+)' contains '(.+)'
\
s*$"
)
def
expect_header_contains
(
conntent
):
pass
setup.py
View file @
1b68675b
...
...
@@ -16,7 +16,7 @@ def read(fname):
setup
(
name
=
"CorePost"
,
version
=
"0.0.
1
"
,
version
=
"0.0.
2
"
,
author
=
"Jacek Furmankiewicz"
,
author_email
=
"jacek99@gmail.com"
,
description
=
(
"A Twisted Web REST micro-framework"
),
...
...
@@ -37,7 +37,9 @@ setup(
],
install_requires
=
[
'twisted>=11.0.0'
,
'twisted.internet.processes>=1.0b1'
'twisted.internet.processes>=1.0b1'
,
'httplib2>=0.7.1'
,
'freshen>=0.2'
,
],
)
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