-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from Debakel/dev/migrate-to-python3
Update to Python 3 and diaspy 0.0.5
- Loading branch information
Showing
10 changed files
with
128 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
tests.py | ||
*.pyc | ||
*.db | ||
log/ | ||
.idea/ | ||
env/ |
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
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
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,4 +1,5 @@ | ||
from FBParser import FBParser | ||
from RSSParser import RSSParser | ||
from FeedDiasp import FeedDiasp | ||
from Diasp import Diasp | ||
from .Diasp import Diasp | ||
from .FBParser import FBParser | ||
from .FeedDiasp import FeedDiasp | ||
from .PostDBCSV import PostDBCSV | ||
from .RSSParser import RSSParser |
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,9 +1,10 @@ | ||
argparse==1.4.0 | ||
#argparse==1.2.1 | ||
#diaspy==0.3.0 | ||
diaspy-api==0.5.1 | ||
facepy==1.0.9 | ||
facepy==1.0.8 | ||
feedparser==5.2.1 | ||
html2text==2016.9.19 | ||
pypandoc==1.4 | ||
requests==2.18.3 | ||
six==1.10.0 | ||
wsgiref==0.1.2 | ||
pypandoc==1.3.3 | ||
#requests==2.9.1 | ||
#six==1.10.0 | ||
#wsgiref==0.1.2 |
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,33 @@ | ||
import os | ||
from unittest import TestCase | ||
|
||
from feeddiasp import Diasp, RSSParser | ||
|
||
RSS_FEED_URL = "http://www.spiegel.de/schlagzeilen/tops/index.rss" | ||
|
||
|
||
class DiaspClientTestCase(TestCase): | ||
def setUp(self): | ||
self.pod = os.environ['FEEDDIASP_TEST_POD'] | ||
self.username = os.environ['FEEDDIASP_TEST_USERNAME'] | ||
self.password = os.environ['FEEDDIASP_TEST_PASSWORD'] | ||
|
||
def test_login(self): | ||
client = Diasp( | ||
pod=self.pod, | ||
username=self.username, | ||
password=self.password) | ||
|
||
try: | ||
client.login() | ||
except Exception as e: | ||
self.fail(e) | ||
|
||
|
||
class RSSParserTestCase(TestCase): | ||
def test_get_posts(self): | ||
rss = RSSParser(url=RSS_FEED_URL) | ||
rss.update() | ||
posts = rss.get_entries() | ||
|
||
self.assertTrue(len(posts) > 0) |