Skip to content

Commit 879aaea

Browse files
committed
Fixed failing tests and removed unwanted packages
1 parent 0a5ab9e commit 879aaea

File tree

5 files changed

+6
-70
lines changed

5 files changed

+6
-70
lines changed

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ test: ## Run tests
3434
test-cov: ## Run tests with coverage
3535
pytest --cov=ellar_throttler --cov-report term-missing tests
3636

37-
doc-deploy: ## Run Deploy Documentation
38-
make clean
39-
mkdocs gh-deploy --force --ignore-version
40-
41-
4237
pre-commit-lint: ## Runs Requires commands during pre-commit
4338
make clean
4439
make fmt

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@
1010
[![PyPI version](https://img.shields.io/pypi/v/ellar-throttler.svg)](https://pypi.python.org/pypi/ellar-throttler)
1111
[![PyPI version](https://img.shields.io/pypi/pyversions/ellar-throttler.svg)](https://pypi.python.org/pypi/ellar-throttler)
1212

13-
Full Documentation: [Here]()
14-
13+
Full Documentation: [Here](https://eadwincode.github.io/ellar/throttling/)

mkdocs.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

pyproject.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,3 @@ test = [
6464
dev = [
6565
"pre-commit"
6666
]
67-
68-
doc = [
69-
"mkdocs >=1.1.2,<2.0.0",
70-
"mkdocs-material >=7.1.9,<9.0.0",
71-
"mdx-include >=1.4.1,<2.0.0",
72-
"mkdocs-markdownextradata-plugin >=0.1.7,<0.3.0",
73-
"markdown-include",
74-
"mkdocstrings"
75-
]

tests/test_throttler.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import pytest
44
from app.controller.module import ControllerModule
55
from app.server import app
6+
from ellar.cache import CacheModule
7+
from ellar.cache.backends.local_cache import LocalMemCacheBackend
68
from ellar.core import TestClient, TestClientFactory
79

810
from ellar_throttler import (
@@ -85,9 +87,7 @@ class TestSkipIfConfigure:
8587
def test_skip_configure(self):
8688
test_module = TestClientFactory.create_test_module(
8789
modules=(
88-
ThrottlerModule.module_configure(
89-
limit=5, ttl=100, skip_if=lambda ctx: True
90-
),
90+
ThrottlerModule.setup(limit=5, ttl=100, skip_if=lambda ctx: True),
9191
ControllerModule,
9292
),
9393
global_guards=[ThrottlerGuard],
@@ -111,9 +111,11 @@ class TestThrottlerStorageServiceConfiguration:
111111
ThrottlerModule.setup(
112112
limit=5, ttl=100, storage=CacheThrottlerStorageService
113113
),
114+
CacheModule.register_setup(),
114115
ControllerModule,
115116
),
116117
global_guards=[ThrottlerGuard],
118+
config_module=dict(CACHES={"default": LocalMemCacheBackend()}),
117119
)
118120

119121
test_module_use_value = TestClientFactory.create_test_module(

0 commit comments

Comments
 (0)