File size: 424 Bytes
a2c4647
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import sys
import os

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))

from app import app


def test_home():
    client = app.test_client()
    response = client.get("/")
    assert response.status_code == 200


def test_random_fruit():
    client = app.test_client()
    response = client.get("/random-fruit")
    assert response.status_code == 200
    assert "fruit" in response.get_json()