Commit ed1251d3 authored by Patrick James Ong's avatar Patrick James Ong

Finished storyline part 4

parent c6c87b6b
from django.shortcuts import render
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
# from django.views.generic.list import ListView
# rom django.views.generic.detail import DetailView
# Create your views here.
class HomeListView(TemplateView):
template_name = 'home.html'
class CloudDetailView(DetailView):
class CloudDetailView(TemplateView):
template_name = 'detail_cloud.html'
class JesterDetailView(DetailView):
class JesterDetailView(TemplateView):
template_name = 'detail_jester.html'
class SunfloweyDetailView(DetailView):
class SunfloweyDetailView(TemplateView):
template_name = 'detail_sunflowey.html'
from selenium import webdriver
import unittest
import time
class NewVisitorTest(unittest.TestCase):
......@@ -35,20 +36,22 @@ class NewVisitorTest(unittest.TestCase):
# When she selects one of the heroes, she is sent to another page
# containing more information about the hero (additional stats, lore, image).
#self.browser.get('http://localhost:8000/hero/cloud')
self.browser.get('http://localhost:8000/hero/cloud')
#self.browser.get('http://localhost:8000/hero/sunflowey')
#self.browser.get('http://localhost:8000/hero/jester')
# She spots the page title and header mentions the name of the hero she selected.
#self.assertIn('Cloud', self.browser.title)
self.assertIn('Cloud', self.browser.title)
#self.assertIn('Sunflowey', self.browser.title)
#self.assertIn('Jester', self.browser.title)
time.sleep(1)
# While she is in a specific hero's page, she sees a button labeled "Back to Heroes List".
# She clicks this and she is redirected back to the wiki's homepage.
#self.browser.get('http://localhost:8000')
self.browser.get('http://localhost:8000')
time.sleep(1)
#self.fail('Finish the test!')
self.fail('Finish the test!')
if __name__ == '__main__':
unittest.main(warnings='ignore')
Markdown is supported
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