forked from samuelclay/NewsBlur
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating integration tests to include updated feeds. Wahoo! Now to fi…
…gure out the dupe issues through testing.
- Loading branch information
1 parent
555b1e3
commit 9626b46
Showing
7 changed files
with
756 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
{ | ||
"pk": 1, | ||
"model": "rss_feeds.feed", | ||
"fields": { | ||
"feed_address": "/Users/conesus/newsblur/apps/rss_feeds/fixtures/gawker1.xml", | ||
"days_to_trim": 90, | ||
"feed_link": "http://gawker.com", | ||
"num_subscribers": 0, | ||
"creation": "2009-01-12", | ||
"feed_title": "Gawker", | ||
"last_update": "2009-07-06 22:30:03", | ||
"min_to_decay": 1, | ||
"etag": "", | ||
"last_modified": "2009-07-06 22:30:03", | ||
"active": 1 | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
{ | ||
"pk": 1, | ||
"model": "rss_feeds.feed", | ||
"fields": { | ||
"feed_address": "/Users/conesus/newsblur/apps/rss_feeds/fixtures/gawker2.xml", | ||
"days_to_trim": 90, | ||
"feed_link": "http://gawker.com", | ||
"num_subscribers": 0, | ||
"creation": "2009-01-12", | ||
"feed_title": "Gawker", | ||
"last_update": "2009-07-06 22:30:03", | ||
"min_to_decay": 1, | ||
"etag": "", | ||
"last_modified": "2009-07-06 22:30:03", | ||
"active": 1 | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
from django.utils import simplejson as json | ||
from django.test.client import Client | ||
from django.test import TestCase | ||
from django.core import management | ||
|
||
class FeedTest(TestCase): | ||
fixtures = ['fixtures/rss_feeds.json'] | ||
fixtures = ['rss_feeds.json'] | ||
|
||
def setUp(self): | ||
self.client = Client() | ||
|
||
def test_load_feeds(self): | ||
self.client.login(userame='test', password='test') | ||
response = self.client.get('/reader/refresh_feed', { "feed_id": 19, "force": True }) | ||
response = self.client.get('/reader/refresh_feed', { "feed_id": 19, "force": True }) | ||
response = self.client.get('/reader/load_single_feed', { "feed_id": 19 }) | ||
print response.content | ||
print json.loads(response.content)[0] | ||
self.client.login(userame='conesus', password='test') | ||
|
||
management.call_command('loaddata', 'gawker1.json', verbosity=0) | ||
response = self.client.get('/reader/refresh_feed', { "feed_id": 1, "force": True }) | ||
|
||
management.call_command('loaddata', 'gawker2.json', verbosity=0) | ||
response = self.client.get('/reader/refresh_feed', { "feed_id": 1, "force": True }) | ||
|
||
response = self.client.get('/reader/load_single_feed', { "feed_id": 1 }) | ||
print [c['story_title'] for c in json.loads(response.content)] | ||
# print json.loads(response.content)[0] |
Oops, something went wrong.