From 3de4bc3a247574887feca3f8a7b04c63542e06b6 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Tue, 22 Jul 2014 12:36:56 +0100 Subject: [PATCH] Added another test for crop_to_point --- wagtail/wagtailimages/tests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wagtail/wagtailimages/tests.py b/wagtail/wagtailimages/tests.py index 0db9549c3..ac1d55e18 100644 --- a/wagtail/wagtailimages/tests.py +++ b/wagtail/wagtailimages/tests.py @@ -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(