Skip to content

Commit

Permalink
fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jaesivsm committed Feb 26, 2016
1 parent f1f7c6a commit be6b923
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 14 deletions.
6 changes: 0 additions & 6 deletions src/tests/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
from tests.api.category import CategoryApiTest
from tests.api.feed import FeedApiTest
from tests.api.article import ArticleApiTest


__all__ = ['CategoryApiTest', 'FeedApiTest', 'ArticleApiTest']
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions src/tests/api/feed.py → src/tests/api/feed_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from tests.base import JarrFlaskCommon
from tests.api.common import ApiCommon
from web.controllers import UserController


class FeedApiTest(JarrFlaskCommon, ApiCommon):
Expand Down Expand Up @@ -69,8 +70,13 @@ def test_feed_article_deletion(self):

def test_feed_list_fetchable(self):
resp = self._api('get', 'feeds/fetchable', user='user1')
self.assertEquals(403, resp.status_code)
UserController().update({'login__in': ['admin', 'user1']},
{'is_api': True})
resp = self._api('get', 'feeds/fetchable', user='user1')
self.assertEquals(3, len(resp.json()))
self.assertEquals(200, resp.status_code)

resp = self._api('get', 'feeds/fetchable', user='user1')
self.assertEquals(204, resp.status_code)

Expand Down
8 changes: 0 additions & 8 deletions src/tests/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
from tests.controllers.user import UserControllerTest
from tests.controllers.category import CategoryControllerTest
from tests.controllers.feed import FeedControllerTest
from tests.controllers.article import ArticleControllerTest


__all__ = ['UserControllerTest', 'CategoryControllerTest',
'FeedControllerTest', 'ArticleControllerTest']
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit be6b923

Please sign in to comment.