Fakultas Ilmu Komputer UI

Commit a2c94feb authored by Muhammad Ariq Basyar's avatar Muhammad Ariq Basyar
Browse files

Merge branch 'dev-ariq' into 'PBI-2-deployment'

Fix incompatible django version and refactor tests

See merge request !1
parents 200593b8 7fbe7018
Pipeline #64117 failed with stages
in 7 minutes and 17 seconds
......@@ -133,5 +133,5 @@ class FasilitasRelatedViewTest(InformasiFasilitasViewTest):
'rating': 3,
'tag': 'KR'}
response = client.put(urls_put, data=send_data,
content_type="multipart/form-data")
content_type="application/x-www-form-urlencoded")
self.assertEqual(response.status_code, HTTPStatus.ACCEPTED)
......@@ -112,5 +112,5 @@ class LokasiRelatedViewTest(InformasiFasilitasViewTest):
urls = reverse('update-lokasi',
kwargs={'nama_lokasi': self.lokasi_test_1["name"]})
response = client.put(urls, data={"latitude": 100},
content_type="multipart/form-data")
content_type="application/x-www-form-urlencoded")
self.assertEqual(response.status_code, HTTPStatus.BAD_REQUEST)
......@@ -122,7 +122,7 @@ class UserTests(APITestCase):
def test_activation_function(self):
user = BisaGoUser.objects.get(phone_number='089892218567').user
uid = urlsafe_base64_encode(force_bytes(user.pk)).decode()
uid = urlsafe_base64_encode(force_bytes(user.pk))
token = account_activation_token.make_token(user)
url = reverse('activate', kwargs={'uidb64' : uid, 'token' : token})
response = self.client.get(url)
......
......@@ -84,7 +84,7 @@ def register_user(request):
message = render_to_string('acc_active_email.html', {
'user' : user,
'domain' : request.get_host,
'uid' : urlsafe_base64_encode(force_bytes(user.pk)).decode(),
'uid' : urlsafe_base64_encode(force_bytes(user.pk)),
'token' : account_activation_token.make_token(user),
})
mail = EmailMessage(mail_subject, message, to=[email])
......
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