Ejemplo n.º 1
0
def test_post():
    message = MailRequest("fakepeer", user,
                          "*****@*****.**" % blog, "Fake body")
    message['Subject'] = 'Test subject'

    post.post(blog, user, "localhost", message)

    assert post.user_exists(user), "User dir not created."
    assert os.path.exists(post.blog_file_name(blog, user)), "File not made."
Ejemplo n.º 2
0
def test_post():
    message = MailRequest("fakepeer", user, "*****@*****.**" % blog,
                          "Fake body")
    message['Subject'] = 'Test subject'

    post.post(blog, user, "localhost", message)

    assert post.user_exists(user), "User dir not created."
    assert os.path.exists(post.blog_file_name(blog, user)), "File not made."
Ejemplo n.º 3
0
def test_blog_file_name():
    name = post.blog_file_name(blog, user)
    assert name.endswith("html")
Ejemplo n.º 4
0
def test_delete():
    test_post()
    post.delete(blog, user)
    assert post.user_exists(user), "User dir should stay."
    assert not os.path.exists(post.blog_file_name(blog, user)), "File should go."
Ejemplo n.º 5
0
def test_blog_file_name():
    name = post.blog_file_name(blog, user)
    assert name.endswith("html")
Ejemplo n.º 6
0
def test_delete():
    test_post()
    post.delete(blog, user)
    assert post.user_exists(user), "User dir should stay."
    assert not os.path.exists(post.blog_file_name(blog,
                                                  user)), "File should go."