mirror of
https://github.com/lucaspalomodevelop/Party.git
synced 2026-03-13 00:07:21 +00:00
21 lines
577 B
Python
21 lines
577 B
Python
from tests import client, app
|
|
from flask import render_template
|
|
|
|
class TestServer:
|
|
def test_root(self, client):
|
|
response = client.get("/")
|
|
assert response.headers["Location"] == "/login"
|
|
# get if response html is same as template
|
|
assert response.data == render_template("login.html")
|
|
|
|
def test_api(self, client):
|
|
response = client.get("/api")
|
|
assert response.status_code == 200
|
|
|
|
|
|
"""
|
|
def test_favicon(self, client):
|
|
response = client.get("/favicon.ico")
|
|
assert response.status_code == 200
|
|
"""
|