Commit bc6d8bd3 authored by Jamy Mahabier's avatar Jamy Mahabier Committed by Justin van der Krieken

Fix mocks in tests

parent bbcc9685
......@@ -2,7 +2,7 @@ import os
import pytest
from zesje import scans, images
from zesje import scans
# Mocks
......@@ -12,7 +12,7 @@ from zesje import scans, images
def mock_get_box_return_original(monkeypatch, datadir):
def mock_return(image, widget, padding):
return image
monkeypatch.setattr(images, 'get_box', mock_return)
monkeypatch.setattr(scans, 'get_box', mock_return)
# Tests
......
......@@ -2,7 +2,7 @@ import pytest
from PIL import Image
import os
from zesje.scans import decode_barcode, ExamMetadata, ExtractedBarcode
from zesje import images
from zesje import scans
# Returns the original image instead of retrieving a box from it
......@@ -10,7 +10,7 @@ from zesje import images
def mock_get_box_return_original(monkeypatch, datadir):
def mock_return(image, widget, padding):
return image
monkeypatch.setattr(images, 'get_box', mock_return)
monkeypatch.setattr(scans, 'get_box', mock_return)
# Tests whether the output of calc angle is correct
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment