Example #1
0
    def test_http_accept_lists(self):
        """Testing djblets.http.get_http_accept_lists"""

        acceptable_mimetypes, unacceptable_mimetypes = get_http_accept_lists(self.request)

        self.assertEqual(acceptable_mimetypes, ["application/xml", "application/json"])
        self.assertEqual(unacceptable_mimetypes, ["text/plain", "*/*"])
Example #2
0
    def test_http_accept_lists(self):
        """Testing get_http_accept_lists"""
        acceptable_mimetypes, unacceptable_mimetypes = \
            get_http_accept_lists(self.request)

        self.assertEqual(acceptable_mimetypes,
                         ['application/xml', 'application/json'])
        self.assertEqual(unacceptable_mimetypes, ['text/plain', '*/*'])
Example #3
0
    def test_http_accept_lists(self):
        """Testing get_http_accept_lists"""
        acceptable_mimetypes, unacceptable_mimetypes = \
            get_http_accept_lists(self.request)

        self.assertEqual(acceptable_mimetypes,
                         ['application/xml', 'application/json'])
        self.assertEqual(unacceptable_mimetypes, ['text/plain', '*/*'])