Skip to content

Commit

Permalink
Fixed testRedditAPI
Browse files Browse the repository at this point in the history
Resolved conflicts with redditAPI unit tests; it now returns successfully!
  • Loading branch information
Nekomian44 committed Mar 28, 2018
1 parent c8b7584 commit 1e2befb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions utilities/tests/testRedditAPI.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from django.test import TestCase

from ..redditAPI import search

class RedditTestCase(TestCase):
"""Unit test to ensure that search string is found in 100 new reddit posts returned from API"""
def setUp(self):
Expand All @@ -11,5 +10,9 @@ def setUp(self):

def test_submissions_contain_query(self):
for submission in self.submissions:
self.assertTrue(self.queryString in submission.title)

#Testing purposes below:
#print(type(submission))
#print(submission.encode("utf-8"))
#print(type(self.queryString))
#print(self.queryString)
self.assertTrue(self.queryString in submission.encode("utf-8"))

0 comments on commit 1e2befb

Please sign in to comment.