(self)
| 237 | self.assertTrue(status) |
| 238 | |
| 239 | def test_session_config(self): |
| 240 | config = dict( |
| 241 | cert='/path/to/cert', |
| 242 | headers={'X-Field': 'Value'}, |
| 243 | proxies=dict(https='socks5://localhost'), |
| 244 | timeout=60, |
| 245 | verify=False) |
| 246 | |
| 247 | def verify(session, config): |
| 248 | self.assertEqual(session.cert, config['cert']) |
| 249 | self.assertEqual({**session.headers, **config['headers']}, session.headers) |
| 250 | self.assertEqual(session.proxies, config['proxies']) |
| 251 | self.assertEqual(session.default_timeout, config['timeout']) |
| 252 | self.assertEqual(session.verify, config['verify']) |
| 253 | |
| 254 | with self.subTest('on construction'): |
| 255 | flow = AuthFlow(session_config=config, **self.test_args) |
| 256 | verify(flow.session, config) |
| 257 | |
| 258 | with self.subTest('post-construction'): |
| 259 | flow = AuthFlow(**self.test_args) |
| 260 | flow.update_session(config) |
| 261 | verify(flow.session, config) |
| 262 | |
| 263 | def test_token_expires_soon(self): |
| 264 | flow = AuthFlow(**self.test_args) |
nothing calls this directly
no test coverage detected