-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_project.py
More file actions
25 lines (17 loc) · 852 Bytes
/
test_project.py
File metadata and controls
25 lines (17 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from project import *
import pytest
def test_gen_rand_european_dish(mocker):
mocker.patch("project.read_csv", return_value=["Recipe 1", "Recipe 2", "Recipe 3"])
mock_gen_pdf = mocker.patch("project.gen_pdf", return_value="Recipe 1")
gen_rand_european_dish()
mock_gen_pdf.assert_called_once()
def test_gen_rand_latin_dish(mocker):
mocker.patch("project.read_csv", return_value=["Recipe 1", "Recipe 2", "Recipe 3"])
mock_gen_pdf = mocker.patch("project.gen_pdf", return_value="Recipe 1")
gen_rand_latin_dish()
mock_gen_pdf.assert_called_once()
def test_gen_rand_african_dish(mocker):
mocker.patch("project.read_csv", return_value=["Recipe 1", "Recipe 2", "Recipe 3"])
mock_gen_pdf = mocker.patch("project.gen_pdf", return_value="Recipe 1")
gen_rand_african_dish()
mock_gen_pdf.assert_called_once()