@mock.patch('six.PY2')
    def test_is_local_address_works_with_python2(self, is_python2_mock):
        is_python2_mock.return_value = True
        self.assertTrue(is_local_address(u'127.0.0.1'))
        self.assertTrue(is_local_address('127.0.0.1'))
        self.assertFalse(is_local_address('126.0.0.10'))
A form validation error should cause a 400 response.
dataset/ETHPy150Open uber/mutornadomon/tests/test_net.py/TestIsLocalAddress.test_is_local_address_works_with_python2--crossover with--dataset/ETHPy150Open rapidsms/rapidsms/rapidsms/contrib/messaging/tests/test_views.py/TestSendView.test_post_no_message