Fakultas Ilmu Komputer UI

Commit 79627332 authored by Samuel Dimas's avatar Samuel Dimas
Browse files

[RED] Failing tests for verification detail page

parent b3aee560
......@@ -9,7 +9,7 @@ from app.models import Materi
class VerifikasiMateriTest(TestCase):
def setUp(self):
self.client = Client()
# def test_verifikasi_materi_url_exist(self):
# response = self.client.get('/administration/')
# self.assertEqual(response.status_code, 200)
......@@ -37,6 +37,32 @@ class VerifikasiMateriTest(TestCase):
# self.assertNotContains(response, 'Halaman Katalog')
def test_verifikasi_materi_url_exist(self):
response = self.client.get('/administration/detail')
self.assertEqual(response.status_code, 200)
def test_verifikasi_materi_using_correct_template(self):
found = resolve('/administration/detail')
self.assertEqual(found.func.__name__, views.detail.__name__)
found2 = resolve('/admin/')
self.assertNotEqual(found2.func.__name__, views.verification.__name__)
def test_verifikasi_materi_title(self):
response = self.client.get('/administration/detail')
self.assertContains(response, 'Dasbor - Verifikasi Materi')
self.assertNotContains(response, 'Fake Title')
def test_verifikasi_materi_content(self):
response = self.client.get('/administration/detail')
self.assertContains(response, 'Judul Verifikasi')
self.assertContains(response, 'Deskripsi')
self.assertContains(response, 'Tombol')
self.assertNotContains(response, 'Halaman Katalog')
class SettingVerifikasiTest(TestCase):
def setUp(self):
......
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