from django.test import TestCase

# Create your tests here.

@@ -29,32 +29,4136 @@
 Case
-%0A%0A# Create your tests here.%0A
+, Client%0Afrom .models import *%0Afrom .views import *%0Aimport datetime%0A%0Aclass ViewsTest(TestCase):%0A    def setUp(self):%0A        self.client = Client()                          %0A        subreddit = Subreddit.objects.create(name=%22testsubreddit%22, title=%22testsubreddit title%22,%0A                                             description=%22testsubreddit description%22)%0A        submission = Submission.objects.create(id=%22000001%22,%0A                                               subreddit=subreddit,%0A                                               title=%22mytitle%22,%0A                                               author=%22myauthor%22,%0A                                               rank=1,%0A                                               rank_previous=2,%0A                                               rank_peak=1,%0A                                               score=10000,%0A                                               num_comments=200,%0A                                               polarity=-0.50,%0A                                               subjectivity=0.25,%0A                                               domain=%22i.redd.it%22,%0A                                               link_flair_text=%22myflair%22,%0A                                               upvote_ratio=0.95,%0A                                               stickied=True,%0A                                               over_18=False,%0A                                               spoiler=True,%0A                                               locked=False,%0A                                               created_at=datetime.datetime(2017, 10, 11, 12, 13, 14))%0A        comment = Comment.objects.create(id=%22000002%22,%0A                                         submission=submission,%0A                                         score=500,%0A                                         is_root=True,%0A                                         is_op=True,%0A                                         is_mod=False,%0A                                         is_admin=False,%0A                                         is_special=False,%0A                                         gilded=2,%0A                                         characters=50,%0A                                         words=10,%0A                                         sentences=2,%0A                                         polarity=-0.75,%0A                                         subjectivity=0.50,%0A                                         created_at=datetime.datetime(2017, 10, 11, 15, 16, 17))%0A        score = SubmissionScore.objects.create(submission=submission,%0A                                               score=submission.score)%0A        num_comments = SubmissionNumComments.objects.create(submission=submission,%0A                                                            num_comments=submission.num_comments)%0A        upvote_ratio = SubmissionUpvoteRatio.objects.create(submission=submission,%0A                                                            upvote_ratio=submission.upvote_ratio)%0A%0A    def test_home_200(self):%0A        response = self.client.get('/')%0A        self.assertEqual(response.status_code, 200)%0A    def test_subreddits_200(self):%0A        response = self.client.get('/subreddits')%0A        self.assertEqual(response.status_code, 200)%0A    def test_about_200(self):%0A        response = self.client.get('/about')%0A        self.assertEqual(response.status_code, 200)%0A    def test_api_200(self):%0A        response = self.client.get('/api?name=submission&id=000001')%0A        self.assertEqual(response.status_code, 200)%0A    def test_submission_200(self):%0A        response = self.client.get('/submission/000001')%0A        self.assertEqual(response.status_code, 200)%0A    def test_subreddit_200(self):%0A        response = self.client.get('/subreddit/testsubreddit')%0A        self.assertEqual(response.status_code, 200)%0A    def test_search_200(self):%0A        response = self.client.get('/search')%0A        self.assertEqual(response.status_code, 200)%0A    def test_search_match(self):%0A        response = self.client.get('/search?q=mytitle&order_by=karma&time=today&subreddits=testsubreddit')%0A        self.assertContains(response, %22Found 1 match%22)

add some basic tests