It seams to me that this line changes the behavior of the test. Shouldn't it be ``self.assertTrue(r.content_type in ("application/json"))``