Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
frozen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSE6
frozen
Commits
0dc5c038
Commit
0dc5c038
authored
2 years ago
by
Arno Wunderlich
Browse files
Options
Downloads
Patches
Plain Diff
fixed db test for login feature
parent
0c4268e9
No related branches found
No related tags found
1 merge request
!25
Add acess only for registered users + logout
Pipeline
#14786
passed
2 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tjts5901/views.py
+10
-1
10 additions, 1 deletion
src/tjts5901/views.py
with
10 additions
and
1 deletion
src/tjts5901/views.py
+
10
−
1
View file @
0dc5c038
...
...
@@ -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
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment