'Ensure that files outside the accepted size range fail validation.'

@ddt.data((99, u'The    file    must    be    at    least    100    bytes    in    size.'), (100,), (1024,), (1025, u'The    file    must    be    smaller    than    1    KB    in    size.'))
@ddt.unpack
@override_settings(PROFILE_IMAGE_MIN_BYTES=100, PROFILE_IMAGE_MAX_BYTES=1024)
def test_file_size(self, upload_size, expected_failure_message=None):

    with make_uploaded_file(dimensions=(1, 1), extension='.png', content_type='image/png', force_size=upload_size) as uploaded_file:
        self.check_validation_result(uploaded_file, expected_failure_message)
