(flush_data)
| 61 | |
| 62 | @patch.dict(os.environ, {"DEEPFACE_POSTGRES_URI": connection_details_str}) |
| 63 | def test_register_with_envvar(flush_data): |
| 64 | img_path = "../unit/dataset/img1.jpg" |
| 65 | result = DeepFace.register( |
| 66 | img=img_path, |
| 67 | model_name="Facenet", |
| 68 | detector_backend="mtcnn", |
| 69 | ) |
| 70 | assert result["inserted"] == 1 |
| 71 | logger.info("✅ Registered with env var test passed.") |
| 72 | |
| 73 | |
| 74 | def test_register_with_connection(flush_data): |