Skip to content

fix: resolve tenant middleware tests and TokenTenant isinstance logic#14

Merged
edimedia merged 1 commit intomainfrom
develop
Feb 4, 2026
Merged

fix: resolve tenant middleware tests and TokenTenant isinstance logic#14
edimedia merged 1 commit intomainfrom
develop

Conversation

@edimedia
Copy link
Member

@edimedia edimedia commented Feb 4, 2026

  • Fix TestTenantMainMiddleware by patching get_tenant_model to avoid LookupError
  • Invert isinstance logic in middleware to check TokenTenant first, then fallback to from_db conversion
  • Update test to use proper Mock with tenant_model class for isinstance compatibility

- Fix TestTenantMainMiddleware by patching get_tenant_model to avoid LookupError
- Invert isinstance logic in middleware to check TokenTenant first, then fallback to from_db conversion
- Update test to use proper Mock with tenant_model class for isinstance compatibility
@edimedia edimedia merged commit 6a2673e into main Feb 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant