def accept(self): return Accept.from_header(header=self.environ.get("HTTP_ACCEPT"))
def accept(self): header = self.headers.get("Accept") if header is not None: header = ",".join(header) return Accept.from_header(header=header)
def test_accept(self): accept = "application/json" request = self.make_request(headers=Headers([("accept", [accept])])) self.assertEqual(request.accept, Accept.from_header(accept))