Exemplo n.º 1
0
    def test_assert_in_body(self):
        """ Test that objects that appear in the body return True """
        content = "Testing 123"
        resp = HttpResponse(self.mock_response, content)

        self.assertTrue(resp.assertInBody("Testing"))
        self.assertTrue(resp.assertNotInBody("noteventhere"))

        self.assertFalse(resp.assertNotInBody("Testing"))
        self.assertFalse(resp.assertInBody("noteventhere"))