Skip to content

Commit b4ad06a

Browse files
authored
[Bitbucket Cloud] Test-Mockup encoding / exec global (#661)
* force file encoding to utf-8, like in respones api * Add exec-global, "null" = None
1 parent d4e8a20 commit b4ad06a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/mockup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def request_mookup(*args, **kwargs):
3030

3131
response_file = os.path.join(RESPONSE_ROOT, url, method)
3232
try:
33-
with open(response_file) as f:
34-
data = {"responses": {}, "__builtins__": {}, "true": True, "false": False}
33+
with open(response_file, encoding="utf-8") as f:
34+
data = {"responses": {}, "__builtins__": {}, "true": True, "false": False, "null": None}
3535
exec(f.read(), data)
3636
data = data["responses"][response_key]
3737
if type(data) is dict:

0 commit comments

Comments
 (0)