-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all tests for both feats are passing
- Loading branch information
1 parent
b12d9f5
commit 661a6a3
Showing
12 changed files
with
559 additions
and
118 deletions.
There are no files selected for viewing
Binary file modified
BIN
+410 Bytes
(100%)
backend/app/api/routes/__pycache__/universe.cpython-39.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
+924 Bytes
(110%)
backend/app/models/universe/__pycache__/universe.cpython-39.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from app.db.session import get_db | ||
from app.models.user import User | ||
|
||
def create_demo_user(): | ||
with get_db() as db: | ||
# Delete existing demo user if exists | ||
demo_user = db.query(User).filter_by(email='[email protected]').first() | ||
if demo_user: | ||
print("Deleting existing demo user...") | ||
db.delete(demo_user) | ||
db.commit() | ||
print("Deleted demo user") | ||
|
||
# Create new demo user | ||
demo_user = User( | ||
email='[email protected]', | ||
username='demo', | ||
is_active=True | ||
) | ||
demo_user.set_password('demo123') | ||
db.add(demo_user) | ||
db.commit() | ||
print("Created demo user") | ||
|
||
# Verify password works | ||
if demo_user.check_password('demo123'): | ||
print("Password verification successful") | ||
else: | ||
print("Password verification failed!") | ||
return demo_user | ||
|
||
if __name__ == '__main__': | ||
create_demo_user() |
Oops, something went wrong.