| 76 | |
| 77 | @patch.object(GCSBackend, '_is_firestore_ttl_policy_enabled') |
| 78 | def test_parse_url(self, mock_firestore_ttl, base_path): |
| 79 | self.app.conf.gcs_bucket = None |
| 80 | self.app.conf.gcs_project = None |
| 81 | |
| 82 | mock_firestore_ttl.return_value = True |
| 83 | backend = GCSBackend( |
| 84 | app=self.app, |
| 85 | url=f'gcs://bucket/{base_path}?gcs_project=project', |
| 86 | ) |
| 87 | assert backend.bucket_name == 'bucket' |
| 88 | assert backend.base_path == base_path.strip('/') |
| 89 | |
| 90 | @patch.object(GCSBackend, '_is_bucket_lifecycle_rule_exists') |
| 91 | @patch.object(GCSBackend, '_is_firestore_ttl_policy_enabled') |