Commit 6e23fab
fix: pass metadata_file_path for content detection and use monkeypatch in tests
- Pass remote_file.uri as metadata_file_path to detect_filetype for
content-based detection, preserving the extension hint for remote files.
- Use monkeypatch.setattr for partition globals in tests to ensure
automatic cleanup and prevent mock leakage between tests.
Co-Authored-By: AJ Steers <aj@airbyte.io>1 parent 5a5044d commit 6e23fab
2 files changed
Lines changed: 13 additions & 4 deletions
File tree
- airbyte_cdk/sources/file_based/file_types
- unit_tests/sources/file_based/file_types
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
| |||
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
246 | | - | |
247 | | - | |
248 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
249 | 256 | | |
250 | 257 | | |
251 | 258 | | |
| |||
0 commit comments