refactor: rename Wizamart to Orion across entire codebase
Replace all ~1,086 occurrences of Wizamart/wizamart/WIZAMART/WizaMart with Orion/orion/ORION across 184 files. This includes database identifiers, email addresses, domain references, R2 bucket names, DNS prefixes, encryption salt, Celery app name, config defaults, Docker configs, CI configs, documentation, seed data, and templates. Renames homepage-wizamart.html template to homepage-orion.html. Fixes duplicate file_pattern key in api.yaml architecture rule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
For comprehensive test structure documentation, please see:
|
||||
|
||||
**[Test Structure Guide](https://yourusername.github.io/wizamart/testing/test-structure/)** in MkDocs
|
||||
**[Test Structure Guide](https://yourusername.github.io/orion/testing/test-structure/)** in MkDocs
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -29,4 +29,4 @@ tests/integration/api/v1/
|
||||
└── shared/ # Shared/common tests
|
||||
```
|
||||
|
||||
See full documentation: [Test Structure Guide](https://yourusername.github.io/wizamart/testing/test-structure/)
|
||||
See full documentation: [Test Structure Guide](https://yourusername.github.io/orion/testing/test-structure/)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
For comprehensive testing documentation, see:
|
||||
|
||||
**[Test Structure Guide](https://yourusername.github.io/wizamart/testing/test-structure/)** in MkDocs
|
||||
**[Test Structure Guide](https://yourusername.github.io/orion/testing/test-structure/)** in MkDocs
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -17,4 +17,4 @@ pytest tests/integration/api/v1/admin/ -v
|
||||
|
||||
⚠️ Tests to be migrated from legacy test files.
|
||||
|
||||
See [Test Structure Guide](https://yourusername.github.io/wizamart/testing/test-structure/) for migration details.
|
||||
See [Test Structure Guide](https://yourusername.github.io/orion/testing/test-structure/) for migration details.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
For comprehensive testing documentation, see:
|
||||
|
||||
**[Test Structure Guide](https://yourusername.github.io/wizamart/testing/test-structure/)** in MkDocs
|
||||
**[Test Structure Guide](https://yourusername.github.io/orion/testing/test-structure/)** in MkDocs
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -17,4 +17,4 @@ pytest tests/integration/api/v1/platform/ -v
|
||||
|
||||
⚠️ Tests to be created.
|
||||
|
||||
See [Test Structure Guide](https://yourusername.github.io/wizamart/testing/test-structure/) for details.
|
||||
See [Test Structure Guide](https://yourusername.github.io/orion/testing/test-structure/) for details.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
For comprehensive testing documentation, see:
|
||||
|
||||
**[Test Structure Guide](https://yourusername.github.io/wizamart/testing/test-structure/)** in MkDocs
|
||||
**[Test Structure Guide](https://yourusername.github.io/orion/testing/test-structure/)** in MkDocs
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -17,4 +17,4 @@ pytest tests/integration/api/v1/shared/ -v
|
||||
|
||||
⚠️ Tests to be migrated from legacy test files (auth, pagination, filtering).
|
||||
|
||||
See [Test Structure Guide](https://yourusername.github.io/wizamart/testing/test-structure/) for migration details.
|
||||
See [Test Structure Guide](https://yourusername.github.io/orion/testing/test-structure/) for migration details.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
For comprehensive store API testing documentation, please see:
|
||||
|
||||
**[Store API Testing Guide](https://yourusername.github.io/wizamart/testing/store-api-testing/)** in MkDocs
|
||||
**[Store API Testing Guide](https://yourusername.github.io/orion/testing/store-api-testing/)** in MkDocs
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -32,5 +32,5 @@ Key fixtures for store testing:
|
||||
|
||||
## See Also
|
||||
|
||||
- [Store API Testing Guide](https://yourusername.github.io/wizamart/testing/store-api-testing/) - Full documentation
|
||||
- [Test Structure](https://yourusername.github.io/wizamart/testing/test-structure/) - Overall test organization
|
||||
- [Store API Testing Guide](https://yourusername.github.io/orion/testing/store-api-testing/) - Full documentation
|
||||
- [Test Structure](https://yourusername.github.io/orion/testing/test-structure/) - Overall test organization
|
||||
|
||||
@@ -67,7 +67,7 @@ class TestFrontendDetectorStore:
|
||||
|
||||
def test_stores_plural_not_store_dashboard(self):
|
||||
"""Test that /stores/ path is NOT store dashboard (it's storefront)."""
|
||||
result = FrontendDetector.detect(host="localhost", path="/stores/wizamart/storefront")
|
||||
result = FrontendDetector.detect(host="localhost", path="/stores/orion/storefront")
|
||||
assert result == FrontendType.STOREFRONT
|
||||
|
||||
|
||||
@@ -87,12 +87,12 @@ class TestFrontendDetectorStorefront:
|
||||
|
||||
def test_detect_storefront_from_stores_path(self):
|
||||
"""Test storefront detection from /stores/ path (path-based store access)."""
|
||||
result = FrontendDetector.detect(host="localhost", path="/stores/wizamart/products")
|
||||
result = FrontendDetector.detect(host="localhost", path="/stores/orion/products")
|
||||
assert result == FrontendType.STOREFRONT
|
||||
|
||||
def test_detect_storefront_from_store_subdomain(self):
|
||||
"""Test storefront detection from store subdomain."""
|
||||
result = FrontendDetector.detect(host="wizamart.oms.lu", path="/products")
|
||||
result = FrontendDetector.detect(host="orion.oms.lu", path="/products")
|
||||
assert result == FrontendType.STOREFRONT
|
||||
|
||||
def test_detect_storefront_from_store_context(self):
|
||||
@@ -148,7 +148,7 @@ class TestFrontendDetectorPriority:
|
||||
def test_path_priority_over_subdomain(self):
|
||||
"""Test that explicit path takes priority for store/storefront."""
|
||||
# /store/ path on a store subdomain -> STORE (path wins)
|
||||
result = FrontendDetector.detect(host="wizamart.oms.lu", path="/store/settings")
|
||||
result = FrontendDetector.detect(host="orion.oms.lu", path="/store/settings")
|
||||
assert result == FrontendType.STORE
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ class TestFrontendDetectorHelpers:
|
||||
|
||||
def test_get_subdomain(self):
|
||||
"""Test subdomain extraction."""
|
||||
assert FrontendDetector._get_subdomain("wizamart.oms.lu") == "wizamart"
|
||||
assert FrontendDetector._get_subdomain("orion.oms.lu") == "orion"
|
||||
assert FrontendDetector._get_subdomain("admin.oms.lu") == "admin"
|
||||
assert FrontendDetector._get_subdomain("oms.lu") is None
|
||||
assert FrontendDetector._get_subdomain("localhost") is None
|
||||
@@ -185,7 +185,7 @@ class TestFrontendDetectorHelpers:
|
||||
def test_is_storefront(self):
|
||||
"""Test is_storefront convenience method."""
|
||||
assert FrontendDetector.is_storefront("localhost", "/storefront/products") is True
|
||||
assert FrontendDetector.is_storefront("wizamart.oms.lu", "/products") is True
|
||||
assert FrontendDetector.is_storefront("orion.oms.lu", "/products") is True
|
||||
assert FrontendDetector.is_storefront("localhost", "/admin/dashboard") is False
|
||||
|
||||
def test_is_platform(self):
|
||||
|
||||
@@ -80,7 +80,7 @@ class TestFrontendTypeMiddleware:
|
||||
|
||||
request = Mock(spec=Request)
|
||||
request.url = Mock(path="/products")
|
||||
request.headers = {"host": "wizamart.oms.lu"}
|
||||
request.headers = {"host": "orion.oms.lu"}
|
||||
mock_store = Mock()
|
||||
mock_store.name = "Test Store"
|
||||
request.state = Mock(clean_path="/products", store=mock_store)
|
||||
@@ -132,7 +132,7 @@ class TestFrontendTypeMiddleware:
|
||||
middleware = FrontendTypeMiddleware(app=None)
|
||||
|
||||
request = Mock(spec=Request)
|
||||
request.url = Mock(path="/stores/wizamart/store/settings")
|
||||
request.url = Mock(path="/stores/orion/store/settings")
|
||||
request.headers = {"host": "localhost"}
|
||||
# clean_path shows the rewritten path
|
||||
request.state = Mock(clean_path="/store/settings", store=None)
|
||||
|
||||
@@ -151,14 +151,14 @@ class TestPlatformContextManager:
|
||||
"""Test path-based detection with deeply nested paths."""
|
||||
request = Mock(spec=Request)
|
||||
request.headers = {"host": "localhost"}
|
||||
request.url = Mock(path="/platforms/oms/stores/wizamart/shop/products")
|
||||
request.url = Mock(path="/platforms/oms/stores/orion/shop/products")
|
||||
|
||||
context = PlatformContextManager.detect_platform_context(request)
|
||||
|
||||
assert context is not None
|
||||
assert context["detection_method"] == "path"
|
||||
assert context["path_prefix"] == "oms"
|
||||
assert context["clean_path"] == "/stores/wizamart/shop/products"
|
||||
assert context["clean_path"] == "/stores/orion/shop/products"
|
||||
|
||||
# ========================================================================
|
||||
# Platform Context Detection Tests - Default (Main Marketing Site)
|
||||
@@ -270,7 +270,7 @@ class TestPlatformContextManager:
|
||||
"/admin/dashboard",
|
||||
"/api/v1/stores",
|
||||
"/about",
|
||||
"/stores/wizamart/shop",
|
||||
"/stores/orion/shop",
|
||||
],
|
||||
)
|
||||
def test_is_not_static_file_request(self, path):
|
||||
@@ -964,13 +964,13 @@ class TestURLRoutingSummary:
|
||||
"""Document: OMS platform in dev mode rewrites path."""
|
||||
request = Mock(spec=Request)
|
||||
request.headers = {"host": "localhost:9999"}
|
||||
request.url = Mock(path="/platforms/oms/stores/wizamart/shop")
|
||||
request.url = Mock(path="/platforms/oms/stores/orion/shop")
|
||||
|
||||
context = PlatformContextManager.detect_platform_context(request)
|
||||
|
||||
assert context["detection_method"] == "path"
|
||||
assert context["path_prefix"] == "oms"
|
||||
assert context["clean_path"] == "/stores/wizamart/shop" # Rewritten
|
||||
assert context["clean_path"] == "/stores/orion/shop" # Rewritten
|
||||
|
||||
def test_loyalty_platform_development_routing(self):
|
||||
"""Document: Loyalty platform in dev mode rewrites path."""
|
||||
|
||||
@@ -409,15 +409,15 @@ class TestStoreContextManager:
|
||||
"""Test extracting store from referer with /stores/ path."""
|
||||
request = Mock(spec=Request)
|
||||
request.headers = {
|
||||
"referer": "http://localhost:8000/stores/wizamart/storefront/products"
|
||||
"referer": "http://localhost:8000/stores/orion/storefront/products"
|
||||
}
|
||||
|
||||
context = StoreContextManager.extract_store_from_referer(request)
|
||||
|
||||
assert context is not None
|
||||
assert context["subdomain"] == "wizamart"
|
||||
assert context["subdomain"] == "orion"
|
||||
assert context["detection_method"] == "path"
|
||||
assert context["path_prefix"] == "/stores/wizamart"
|
||||
assert context["path_prefix"] == "/stores/orion"
|
||||
assert context["full_prefix"] == "/stores/"
|
||||
|
||||
def test_extract_store_from_referer_path_store(self):
|
||||
@@ -438,7 +438,7 @@ class TestStoreContextManager:
|
||||
def test_extract_store_from_referer_subdomain(self):
|
||||
"""Test extracting store from referer with subdomain."""
|
||||
request = Mock(spec=Request)
|
||||
request.headers = {"referer": "http://wizamart.platform.com/storefront/products"}
|
||||
request.headers = {"referer": "http://orion.platform.com/storefront/products"}
|
||||
|
||||
with patch("middleware.store_context.settings") as mock_settings:
|
||||
mock_settings.platform_domain = "platform.com"
|
||||
@@ -446,9 +446,9 @@ class TestStoreContextManager:
|
||||
context = StoreContextManager.extract_store_from_referer(request)
|
||||
|
||||
assert context is not None
|
||||
assert context["subdomain"] == "wizamart"
|
||||
assert context["subdomain"] == "orion"
|
||||
assert context["detection_method"] == "referer_subdomain"
|
||||
assert context["host"] == "wizamart.platform.com"
|
||||
assert context["host"] == "orion.platform.com"
|
||||
|
||||
def test_extract_store_from_referer_custom_domain(self):
|
||||
"""Test extracting store from referer with custom domain."""
|
||||
|
||||
Reference in New Issue
Block a user