Add python mock example and utils file like this one
# tests/utils.py
1 import io
2 import json
3
4
5 def get_fake_file(filename):
6 with open(f'tests/data/{filename}', encoding='utf-8') as data_file:
7 output = io.StringIO(data_file.read())
8 return output
9
10
11 def get_fake_json(filename):
12 with open(f'tests/data/{filename}', encoding='utf-8') as data_file:
13 return json.loads(data_file.read())
It's not directly related with BDD but very common and useful.
We also should add a Documentation section describing usage and examples.
Add python mock example and utils file like this one
It's not directly related with BDD but very common and useful.
We also should add a Documentation section describing usage and examples.