Skip to content

Commit 8ee4c46

Browse files
committed
Bump config and tweak columns lengths
1 parent 26abe91 commit 8ee4c46

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

fastapi_users_db_tortoise/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class TortoiseBaseUserModel(models.Model):
1616
id = fields.UUIDField(pk=True, generated=False)
1717
email = fields.CharField(index=True, unique=True, null=False, max_length=255)
18-
hashed_password = fields.CharField(null=False, max_length=255)
18+
hashed_password = fields.CharField(null=False, max_length=1024)
1919
is_active = fields.BooleanField(default=True, null=False)
2020
is_superuser = fields.BooleanField(default=False, null=False)
2121
is_verified = fields.BooleanField(default=False, null=False)
@@ -27,9 +27,9 @@ class Meta:
2727
class TortoiseBaseOAuthAccountModel(models.Model):
2828
id = fields.UUIDField(pk=True, generated=False, max_length=255)
2929
oauth_name = fields.CharField(null=False, max_length=255)
30-
access_token = fields.CharField(null=False, max_length=255)
30+
access_token = fields.CharField(null=False, max_length=1024)
3131
expires_at = fields.IntField(null=True)
32-
refresh_token = fields.CharField(null=True, max_length=255)
32+
refresh_token = fields.CharField(null=True, max_length=1024)
3333
account_id = fields.CharField(index=True, null=False, max_length=255)
3434
account_email = fields.CharField(null=False, max_length=255)
3535

pyproject.toml

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
[tool.isort]
2+
profile = "black"
3+
4+
[tool.pytest.ini_options]
5+
asyncio_mode = "auto"
6+
addopts = "--ignore=test_build.py"
7+
markers = ["db"]
8+
19
[build-system]
210
requires = ["flit_core >=2,<3"]
311
build-backend = "flit_core.buildapi"

setup.cfg

-13
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,3 @@ exclude = docs
1212
max-line-length = 88
1313
docstring-convention = numpy
1414
ignore = D1
15-
16-
[isort]
17-
profile = black
18-
19-
[tool:pytest]
20-
addopts = --ignore=test_build.py
21-
asyncio_mode = auto
22-
markers =
23-
authentication
24-
db
25-
fastapi_users
26-
oauth
27-
router

tests/conftest.py

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def event_loop():
3434
"""Force the pytest-asyncio loop to be the main one."""
3535
loop = asyncio.new_event_loop()
3636
yield loop
37+
loop.close()
3738

3839

3940
@pytest.fixture

0 commit comments

Comments
 (0)