Commit 1b68675b authored by Jacek's avatar Jacek

working on BDD tests

parent 38cb1a57
'''
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
...@@ -16,7 +16,7 @@ def read(fname): ...@@ -16,7 +16,7 @@ def read(fname):
setup( setup(
name="CorePost", name="CorePost",
version="0.0.1", version="0.0.2",
author="Jacek Furmankiewicz", author="Jacek Furmankiewicz",
author_email="jacek99@gmail.com", author_email="jacek99@gmail.com",
description=("A Twisted Web REST micro-framework"), description=("A Twisted Web REST micro-framework"),
...@@ -37,7 +37,9 @@ setup( ...@@ -37,7 +37,9 @@ setup(
], ],
install_requires=[ install_requires=[
'twisted>=11.0.0', 'twisted>=11.0.0',
'twisted.internet.processes>=1.0b1' 'twisted.internet.processes>=1.0b1',
'httplib2>=0.7.1',
'freshen>=0.2',
], ],
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment