Commit 7adfd942 authored by dennisjl's avatar dennisjl
Browse files

Fixes som indexing error, typos etc

parent 3be1e53e
Pipeline #76878 passed with stage
in 1 minute and 15 seconds
......@@ -15,7 +15,7 @@ class ProjectViewTest(TestCase):
self.requestFactory = RequestFactory()
self.projectOwner = User.objects.create_user(
pk = 0,
pk = 1,
username = "Project0wner",
email = "project0wner@harakirimail.com",
password = "morraD1erm@nn"
......@@ -28,10 +28,10 @@ class ProjectViewTest(TestCase):
password = "morraD1erm@nn"
)
projectCategory = ProjectCategory.objects.create(pk = 0, name = "Cleaning")
projectCategory = ProjectCategory.objects.create(pk = 1, name = "Cleaning")
self.testProject = Project.objects.create(
pk = 0,
pk = 1,
user = self.projectOwnerProfile,
title = "Test",
description = "Test, hjemmerens",
......@@ -40,7 +40,7 @@ class ProjectViewTest(TestCase):
)
self.task = Task.objects.create(
pk = 0,
pk = 1,
project = self.testProject,
title = "Test task, will pay rs3 gp",
description = "can also do rs3 stonks",
......@@ -50,7 +50,7 @@ class ProjectViewTest(TestCase):
#Response
def test_project_view(self):
taskOffer = TaskOffer.objects.create(
pk = 0,
pk = 1,
task = self.task,
title = "Test",
description = "dummy test",
......@@ -61,8 +61,8 @@ class ProjectViewTest(TestCase):
self.client.login(username = "Project0wner", password = "morraD1erm@nn")
response = self.client.post(f"/projects/{offerID}/", {
"status" : "a",
"offerResponse" : True,
"status" : 'a',
"offer_response" : True,
"taskofferid" : offerID,
"feedback" : "It works"
})
......@@ -71,7 +71,7 @@ class ProjectViewTest(TestCase):
#notfound 404
def test_project_not_found(self):
taskOffer = TaskOffer.objects.create(
pk = 0,
pk = 1,
task = self.task,
title = "Test",
description = "dummy test",
......@@ -97,7 +97,7 @@ class ProjectViewTest(TestCase):
self.assertEqual(response.status_code, 200)
post = self.requestFactory.post("/project/" + str(self.projectOwner.id),{
"statuschange" : "",
"status_change" : "",
"status" : "i"
})
post.user = self.projectOwner
......@@ -107,7 +107,7 @@ class ProjectViewTest(TestCase):
#submit offer at project view
def test_submit_offer(self):
post = self.requestFactory.post("/project/" + str(self.bidder.id), {
"offerSubmit" : True,
"offer_submit" : True,
"title" : "testOffer",
"price" : 100,
"taskvalue" : self.task.id
......@@ -167,4 +167,4 @@ class PermissionTest(TestCase):
def test_no_permission(self):
user = User.objects.create(username = "user")
task = Task.objects.get(title = "test")
self.assertEqual(get_user_task_permissions(user, task), self.noPermissionDictionary)
\ No newline at end of file
self.assertEqual(get_user_task_permissions(user, task), self.noPermissionDictionary)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment