Test searching all extensions without filters.
(self, temp_dir)
| 2925 | assert not catalog.is_cache_valid() |
| 2926 | |
| 2927 | def test_search_all_extensions(self, temp_dir): |
| 2928 | """Test searching all extensions without filters.""" |
| 2929 | import yaml as yaml_module |
| 2930 | |
| 2931 | project_dir = temp_dir / "project" |
| 2932 | project_dir.mkdir() |
| 2933 | (project_dir / ".specify").mkdir() |
| 2934 | |
| 2935 | # Use a single-catalog config so community extensions don't interfere |
| 2936 | config_path = project_dir / ".specify" / "extension-catalogs.yml" |
| 2937 | with open(config_path, "w") as f: |
| 2938 | yaml_module.dump( |
| 2939 | { |
| 2940 | "catalogs": [ |
| 2941 | { |
| 2942 | "name": "test-catalog", |
| 2943 | "url": ExtensionCatalog.DEFAULT_CATALOG_URL, |
| 2944 | "priority": 1, |
| 2945 | "install_allowed": True, |
| 2946 | } |
| 2947 | ] |
| 2948 | }, |
| 2949 | f, |
| 2950 | ) |
| 2951 | |
| 2952 | catalog = ExtensionCatalog(project_dir) |
| 2953 | |
| 2954 | # Create mock catalog |
| 2955 | catalog_data = { |
| 2956 | "schema_version": "1.0", |
| 2957 | "extensions": { |
| 2958 | "jira": { |
| 2959 | "name": "Jira Integration", |
| 2960 | "id": "jira", |
| 2961 | "version": "1.0.0", |
| 2962 | "description": "Jira integration", |
| 2963 | "author": "Stats Perform", |
| 2964 | "tags": ["issue-tracking", "jira"], |
| 2965 | "verified": True, |
| 2966 | }, |
| 2967 | "linear": { |
| 2968 | "name": "Linear Integration", |
| 2969 | "id": "linear", |
| 2970 | "version": "0.9.0", |
| 2971 | "description": "Linear integration", |
| 2972 | "author": "Community", |
| 2973 | "tags": ["issue-tracking"], |
| 2974 | "verified": False, |
| 2975 | }, |
| 2976 | }, |
| 2977 | } |
| 2978 | |
| 2979 | # Save to cache |
| 2980 | catalog.cache_dir.mkdir(parents=True, exist_ok=True) |
| 2981 | catalog.cache_file.write_text(json.dumps(catalog_data)) |
| 2982 | catalog.cache_metadata_file.write_text( |
| 2983 | json.dumps( |
| 2984 | { |
nothing calls this directly
no test coverage detected