Fakultas Ilmu Komputer UI

Commit 58ad8b81 authored by ilestin.il's avatar ilestin.il
Browse files

[RED] make initialization test for upload materi page

parent 49ef345c
......@@ -128,3 +128,43 @@ class TemplateLoaderTest(TestCase):
response = Client().get(url)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, expected_template_name)
class UploadPageTest(TestCase):
def test_upload_page_using_login_func(self):
found = resolve("")
self.assertEqual(found.func.__name__, )
def test_upload_page_url_is_exist(self):
# Positive tests
response = Client().get("")
self.assertEqual(response.status_code, 200)
# Negative tests
response = Client().get("")
self.assertEqual(response.status_code, 404)
def test_upload_page_template(self):
url = ""
response = Client().get(url)
expected_template_name = ""
self.assertTemplateUsed(response, expected_template_name)
def test_upload_page_title(self):
response = Client().get("")
# Positive tests
self.assertContains(response, "")
# Negative tests
self.assertNotContains(response, "")
def test_upload_page_form_field(self):
response = Client().get("")
# Positive tests
self.assertContains(response, "")
self.assertContains(response, "")
# Negative tests
self.assertNotContains(response, "")
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