Skip to content
Snippets Groups Projects
Commit 0dc5c038 authored by Arno Wunderlich's avatar Arno Wunderlich
Browse files

fixed db test for login feature

parent 0c4268e9
No related branches found
No related tags found
1 merge request!25Add acess only for registered users + logout
Pipeline #14786 passed
......@@ -32,12 +32,21 @@ def test_item_adding():
"""
Test item is added
"""
# for test purpose create random number (unique mail address required)
ran_int = str(random.randint(0,10000))
# Create a new user
user = User()
user.email = "test" + ran_int + "@gmail.com"
user.password = "placeholder"
user.save()
# Create a new item
item = Item()
item.title = "Test title"
item.description = "This is a test description"
item.starting_bid = 100
item.seller = current_user
item.seller = user
item.save()
return "OK"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment