|
|
@@ -107,5 +107,21 @@ class TwilioTestCase(TestCase):
|
|
|
# resp = self.client.post('/hackathon/twilio/', {'number': '+13473282978', 'message': 'hello world'})
|
|
|
# self.assertEqual(resp.status_code, 302)
|
|
|
|
|
|
+class NewYorkTimesTestCase(TestCase):
|
|
|
+ def testPopularArticles(self):
|
|
|
+ resp = self.client.get('/hackathon/nytimespop/')
|
|
|
+ self.assertEqual(resp.status_code, 200)
|
|
|
+
|
|
|
+ def testPopularArticlesContent(self):
|
|
|
+ resp = self.client.get('/hackathon/nytimespop/')
|
|
|
+ self.assertNotEqual(resp.content, '')
|
|
|
+
|
|
|
+ def testTopArticles(self):
|
|
|
+ resp = self.client.get('/hackathon/nytimestop/')
|
|
|
+ self.assertEqual(resp.status_code, 200)
|
|
|
+
|
|
|
+ def testTopArticlesContent(self):
|
|
|
+ resp = self.client.get('/hackathon/nytimestop/')
|
|
|
+ self.assertNotEqual(resp.content, '')
|
|
|
|
|
|
|