def test_should_prepare_head_request(self): factory = RequestFactory() request = factory.head('/') self.assertEqual(request.method, 'HEAD')
def test_should_prepare_post_request_with_content_type(self): factory = RequestFactory() request = factory.post('/', content_type='application/json') self.assertEqual(request.method, 'POST')
def test_should_prepare_post_request_with_content_type_and_encodint(self): factory = RequestFactory() request = factory.post('/', content_type='text/plain; charset=UTF-8') self.assertEqual(request.method, 'POST')
def test_should_prepare_post_request(self): factory = RequestFactory() request = factory.post('/') self.assertEqual(request.method, 'POST')
def test_should_prepare_get_request_with_params(self): factory = RequestFactory() request = factory.get('/abc;type=json') self.assertEqual(request.method, 'GET')
def test_should_prepare_get_request(self): factory = RequestFactory() request = factory.get('/') self.assertEqual(request.method, 'GET')
def test_should_prepare_delete_request(self): factory = RequestFactory() request = factory.delete('/') self.assertEqual(request.method, 'DELETE')
def test_should_prepare_options_request(self): factory = RequestFactory() request = factory.options('/') self.assertEqual(request.method, 'OPTIONS')