Skip to content

Commit

Permalink
Merge pull request #38 from elansteam/dev
Browse files Browse the repository at this point in the history
fixed tests
  • Loading branch information
difhel authored Feb 5, 2024
2 parents 1e85afe + 7c0af2c commit d806aa8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 8 additions & 4 deletions testing/database_test/group_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ async def test_autoincrement_simple():
"""Testing autoincrement technology for group"""

group_first = Group(
_id=1, # not used
name="first",
owner=-1
owner=1
)

group_second = Group(
_id=1, # not used
name="second",
owner=-1
owner=1
)

group_third = Group(
_id=1, # not used
name="third",
owner=-1
owner=1
)

collection = MongoManager.get_db().get_collection(Config.Collections.groups)
Expand Down Expand Up @@ -68,8 +71,9 @@ async def test_autoincrement_stress():
collection = MongoManager.get_db().get_collection(Config.Collections.groups)
for i in range(100):
current_user = Group(
_id=1, # not used
name=str(i + 1),
owner=-1
owner=1
)

await db.group.insert_with_id(current_user)
Expand Down
4 changes: 4 additions & 0 deletions testing/database_test/user_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@ async def test_autoincrement_simple():
"""Testing autoincrement technology for user"""

user_first = User(
_id=1, # not used
first_name="first",
last_name="user",
email="test@gmail.com",
password_hash="test_hash"
)

user_second = User(
_id=1, # not used
first_name="second",
last_name="user",
email="test@gmail.com",
password_hash="test_hash"
)

user_third = User(
_id=1, # not used
first_name="third",
last_name="user",
email="test@gmail.com",
Expand Down Expand Up @@ -82,6 +85,7 @@ async def test_autoincrement_stress():

for i in range(100):
current_user = User(
_id=1, # not used
first_name=str(i + 1),
last_name="user",
email="test@gmail.com",
Expand Down

0 comments on commit d806aa8

Please sign in to comment.