Fakultas Ilmu Komputer UI

Commit a6e57223 authored by Muhammad Fakhrillah Abdul Azis's avatar Muhammad Fakhrillah Abdul Azis
Browse files

Merge branch '1606917531-210' into 'master'

1606917531 210

See merge request !276
parents fb94ea22 4f962ca0
Pipeline #26840 passed with stages
in 8 minutes and 32 seconds
......@@ -6,7 +6,8 @@ from django.core.exceptions import ValidationError
from rest_framework import status
from rest_framework.test import APITestCase
from core.views.sso_login import get_access_token, get_riwayat_user
from django.core import serializers
from core.models.accounts import Student
from StringIO import StringIO ## for Python 2
......@@ -581,6 +582,30 @@ class ResponseApiLoginCompany(APITestCase):
self.assertTrue("last_login" in response.data.keys())
class TranscriptTest(APITestCase):
# Belum bisa diimplementasikan karena untuk melihat transcript akun yang digunakan harus tercatat pada service API SSO.
# Implementasi fitur ini menggunakan access token yang langsung diambil dari API SSO.
def test_transcript_success(self, m):
url = '/api/login/'
response = self.client.post(url, {'username': 'dummy.mahasiswa', 'password': 'lalala', 'login-type': 'sso-ui'},
student_id = response.data.get('student').get('id')
student = Student.objects.all()
url = '/api/students/' + str(student_id) + "/transcript/"
response = self.client.get(url)
def test_transcript_fail(self, m):
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