示例#1
0
    def test_should_prepare_post_request_with_content_type(self):

        factory = RequestFactory()
        request = factory.post('/', content_type='application/json')
        self.assertEqual(request.method, 'POST')
示例#2
0
    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')
示例#3
0
    def test_should_prepare_post_request(self):

        factory = RequestFactory()
        request = factory.post('/')
        self.assertEqual(request.method, 'POST')