mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-10 16:24:49 +00:00
Added another test for crop_to_point
This commit is contained in:
parent
057fd966c9
commit
3de4bc3a24
1 changed files with 7 additions and 0 deletions
|
|
@ -483,6 +483,13 @@ class TestCropToPoint(TestCase):
|
|||
CropBox(270, 190, 370, 290),
|
||||
)
|
||||
|
||||
def test_basic_no_focal_point(self):
|
||||
"If focal point is None, it should make one in the centre of the image"
|
||||
self.assertEqual(
|
||||
crop_to_point((640, 480), (100, 100), None),
|
||||
CropBox(270, 190, 370, 290),
|
||||
)
|
||||
|
||||
def test_doesnt_exit_top_left(self):
|
||||
"Test that the cropbox doesn't exit the image at the top left"
|
||||
self.assertEqual(
|
||||
|
|
|
|||
Loading…
Reference in a new issue