Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ola Hermann Opheim
agreelance123
Commits
2bab2467
Commit
2bab2467
authored
Mar 23, 2020
by
Ola Hermann Opheim
Browse files
Merge branch 'test/register_tests' into 'master'
Test/register tests See merge request olahop/agreelance123!10
parents
6adb7372
0010bbbf
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
projects/tests.py
View file @
2bab2467
...
...
@@ -234,7 +234,7 @@ class GiveTaskOfferBoundaryTest(unittest.TestCase):
# title 199 chars
nr_of_offers
=
TaskOffer
.
objects
.
count
()
self
.
client
.
post
(
f
'/projects/
{
self
.
testBoundaryProject
.
pk
}
/'
,
{
'title'
:
title_200char
,
'title'
:
title_200char
[:
-
1
]
,
'description'
:
'max 500'
,
'price'
:
123
,
'taskvalue'
:
self
.
testBoundaryTask
.
id
,
...
...
@@ -245,7 +245,7 @@ class GiveTaskOfferBoundaryTest(unittest.TestCase):
# title 200 chars
nr_of_offers
=
TaskOffer
.
objects
.
count
()
self
.
client
.
post
(
f
'/projects/
{
self
.
testBoundaryProject
.
pk
}
/'
,
{
'title'
:
title_200char
[:
-
1
]
,
'title'
:
title_200char
,
'description'
:
'max 500'
,
'price'
:
123
,
'taskvalue'
:
self
.
testBoundaryTask
.
id
,
...
...
@@ -332,7 +332,7 @@ class GiveTaskOfferBoundaryTest(unittest.TestCase):
'taskvalue'
:
self
.
testBoundaryTask
.
id
,
'offer_submit'
:
True
})
#
TODO:
self.assertEqual(TaskOffer.objects.count(), nr_of_offers)
# self.assertEqual(TaskOffer.objects.count(), nr_of_offers)
# price 0
nr_of_offers
=
TaskOffer
.
objects
.
count
()
...
...
@@ -416,14 +416,8 @@ class AcceptingOfferOutputTest(unittest.TestCase):
project
=
response
.
context
[
'project'
]
self
.
assertEqual
(
project
,
self
.
testAcceptProject
)
self
.
assertTrue
(
self
.
userOfferer
.
profile
in
project
.
participants
.
all
())
# TODO: fix in code if this is the error
# self.assertEqual(project.status, 'i')
# Checks output task relevant data
task
=
Task
.
objects
.
get
(
id
=
self
.
testAcceptTask
.
id
)
self
.
assertEqual
(
response
.
context
[
'tasks'
][
0
],
self
.
testAcceptTask
)
...
...
user/tests.py
View file @
2bab2467
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment