Skip to content

Commit b1ecb74

Browse files
committed
Add Models to JWTRoutes class & init_app method #119
1 parent 81489ea commit b1ecb74

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_extensions.py

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ class TestExtension:
1515
config = {
1616
"IGNORED_ROUTES": IGNORED_ROUTES,
1717
"WHITE_LIST_ROUTES": WHITE_LIST_ROUTES,
18+
"SECRET_KEY": "a sectrect key",
19+
"JWT_ROUTER_API_NAME": "api/v1",
20+
"ENTITY_KEY": "user_id",
1821
}
1922

2023
def test_init_extensions(self, MockEntityModel):
@@ -24,6 +27,8 @@ def test_init_extensions(self, MockEntityModel):
2427
assert config.whitelist_routes == self.WHITE_LIST_ROUTES
2528
assert config.ignored_routes == self.IGNORED_ROUTES
2629
assert config.entity_models == [MockEntityModel]
30+
assert config.entity_key == "user_id"
31+
assert config.api_name == "api/v1"
2732

2833
config = {**self.config, "ENTITY_MODELS": [MockEntityModel]}
2934
con = extensions.init_extensions(config)

0 commit comments

Comments
 (0)