Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
DIGIPUS
Commits
3bb4735a
Commit
3bb4735a
authored
Nov 18, 2020
by
Nurma Ayu Wigati S. Subroto
Browse files
Merge branch '1906438014-46' into 'master'
[
#46
] Delete Rating See merge request
!116
parents
a987c69c
43bb4812
Pipeline
#60725
passed with stages
in 20 minutes and 36 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
app/templates/given-rating.html
View file @
3bb4735a
...
...
@@ -101,6 +101,7 @@
<td>
{{ i.score }}
</td>
<td>
<a
href=
"/edit/{{ i.score }}"
><span
class=
"glyphicon glyphicon-pencil"
>
Edit
</span></a>
<a
href=
"/delete/{{ i.score }}"
><span
class=
"glyphicon glyphicon-pencil"
>
Delete
</span></a>
</td>
</tr>
{% endfor %}
...
...
app/tests.py
View file @
3bb4735a
...
...
@@ -2343,6 +2343,13 @@ class RatingMateriTest(TestCase):
found
=
resolve
(
self
.
url_rate
)
self
.
assertEqual
(
found
.
func
,
add_rating_materi
)
def
test_rating_materi_url_use_delete_rating_materi_function
(
self
):
response
=
self
.
client
.
get
(
self
.
url_rate
)
response_json
=
json
.
loads
(
response
.
content
)
self
.
assertEqual
(
response_json
.
get
(
"success"
,
None
),
False
)
self
.
assertEqual
(
response_json
.
get
(
"msg"
,
None
),
"Forbidden"
)
self
.
assertEqual
(
response
.
status_code
,
403
)
def
test_rating_materi_get_method_should_return_403_forbidden
(
self
):
response
=
self
.
client
.
get
(
self
.
url_rate
)
response_json
=
json
.
loads
(
response
.
content
)
...
...
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