Commit ca6bfb3f authored by harkamalsi's avatar harkamalsi
Browse files

Merge fixes

parent 9fb6024d
......@@ -18,10 +18,6 @@ from .permissions import (
from workouts.models import Workout, Exercise, ExerciseInstance
from users.models import User
from .views import ExerciseInstanceList
<<<<<<< HEAD
=======
>>>>>>> fc4a1bfefb2dc89663ec92b626ca9548ba948253
from datetime import date
......@@ -106,12 +102,9 @@ class TestPermissions(APITestCase):
e1 = self.create_exercise("Pushups")
e2 = self.create_exercise("Situps")
<<<<<<< HEAD
=======
self.assertTrue(isinstance(e1, Exercise))
self.assertTrue(isinstance(e2, Exercise))
>>>>>>> fc4a1bfefb2dc89663ec92b626ca9548ba948253
w1 = self.create_workout("test1", a, "PU")
w2 = self.create_workout("test2", a, "CO")
self.assertTrue(isinstance(w1, Workout))
......@@ -180,16 +173,6 @@ class TestPermissions(APITestCase):
athlete = User.objects.get(username="athlete")
workout = Workout.objects.get(name="test1")
exercise = ExerciseInstance.objects.get(exercise=1)
<<<<<<< HEAD
request.user = athlete
request.method = "POST"
request.data = {"workout": "http://127.0.0.1:8000/api/workouts/1/"}
has_perm = IsOwnerOfWorkout.has_permission(self, request=request, view=None)
self.assertTrue(has_perm)
=======
request.user = athlete
request.method = "POST"
......@@ -200,7 +183,6 @@ class TestPermissions(APITestCase):
self.assertTrue(has_perm)
>>>>>>> fc4a1bfefb2dc89663ec92b626ca9548ba948253
def test_IsWorkoutOwnerObj(self):
request = APIRequestFactory().get("/")
......@@ -232,14 +214,8 @@ class TestPermissions(APITestCase):
def test_IsReadOnly(self):
request = APIRequestFactory().get("/workout-detail/2")
athlete = User.objects.get(username="user")
<<<<<<< HEAD
workout = ExerciseInstance.objects.get(exercise=2)
=======
workout = ExerciseInstance.objects.get(exercise=2)
>>>>>>> fc4a1bfefb2dc89663ec92b626ca9548ba948253
request.user = athlete
resp = IsReadOnly.has_object_permission(
......
......@@ -99,11 +99,7 @@
</div>
<div class="row">
<div class="col">
<<<<<<< HEAD
<div class="tab-content" id="nav-tabContent2"></div>
=======
<div class="tab-content" id="nav-tabContentGoals"></div>
>>>>>>> fc4a1bfefb2dc89663ec92b626ca9548ba948253
</div>
</div>
</div>
......@@ -136,27 +132,6 @@
>
<template id="template-show-goal">
<<<<<<< HEAD
<form class="input-group" id="output-goal">
<input
type="text"
class="form-control"
id="inputGoal"
name="goal"
readonly
/>
<input type="text" class="form-control" id="coach" readonly />
<input type="text" class="form-control" id="creationDate" readonly />
<input type="text" class="form-control" id="completion_date" readonly />
<input
type="checkbox"
class="form-check-input"
id="checkCom"
name="completed"
/>
</form>
=======
<form class="input-group" id="output-goal">
<input
type="text"
......@@ -175,8 +150,6 @@
name="completed"
/>
</form>
>>>>>>> fc4a1bfefb2dc89663ec92b626ca9548ba948253
</template>
<template id="template-goal-labels">
......
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