'A PUT request to /json/realm/icon with an invalid file should fail.'

def test_invalid_icons(self):

    for fname in self.corrupt_files:
        self.login(self.example_email('iago'))
        with get_test_image_file(fname) as fp:
            result = self.client_post('/json/realm/icon', {'file': fp})
        self.assert_json_error(result, 'Could    not    decode    image;    did    you    upload    an    image    file?')
