def test_process_max_age(self): fake_req = mock.MagicMock() fake_resp = mock.MagicMock() cors = CORS(max_age=5) cors._process_max_age(fake_req, fake_resp) fake_resp.set_header.assert_called_once_with('access-control-max-age', 5)