示例#1
0
def then_i_see_the_post_in_the_editing_form(step):
    title = css("#id_title").get_attribute("value").strip()
    assert title == "My Title Draft", "wrong title: '%s'" % title
    body = css("#id_body").text.strip()
    assert body == "This is the body of my Draft post", "wrong body: '%s'" % body
示例#2
0
def then_the_post_appears_on_my_blog(step):
    world.browser.get(django_url("/blogs/"))
    csss("a.read-more")[0].click()
    assert css("h2").text.strip() == "My Title Publish"
示例#3
0
def given_i_click_on_the_first_one(step):
    css("a.edit-post").click()
示例#4
0
def and_i_visit_the_post_editor(step):
    world.browser.get(django_url("/posts/edit"))
    css(".edit-post")
示例#5
0
def given_i_create_a_post_with_status(step, status):
    css("#id_title").send_keys("My Title %s" % status)
    css("#id_body").send_keys("This is the body of my %s post" % status)
    css(".tagit-input").send_keys("tag1, tag2, tag3")
    css("#id_status").send_keys(status)
    css("input[type=submit]").click()
示例#6
0
def then_i_see_the_post_in_the_editing_form(step):
    title = css("#id_title").get_attribute("value").strip()
    assert title == "My Title Draft", "wrong title: '%s'" % title
    body = css("#id_body").text.strip()
    assert body == "This is the body of my Draft post", "wrong body: '%s'" % body
示例#7
0
def given_i_click_on_the_first_one(step):
    css("a.edit-post").click()
示例#8
0
def then_the_post_appears_on_my_blog(step):
    world.browser.get(django_url("/blogs/"))
    csss("a.read-more")[0].click()
    assert css("h2").text.strip() == "My Title Publish"
示例#9
0
def given_i_create_a_post_with_status(step, status):
    css("#id_title").send_keys("My Title %s" % status)
    css("#id_body").send_keys("This is the body of my %s post" % status)
    css(".tagit-input").send_keys("tag1, tag2, tag3")
    css("#id_status").send_keys(status)
    css("input[type=submit]").click()
示例#10
0
def and_i_visit_the_post_editor(step):
    world.browser.get(django_url("/posts/edit"))
    css(".edit-post")