Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2042] Move related tests to new_tests.
- Loading branch information
David Read
committed
Nov 21, 2014
1 parent
39132e3
commit 737c4bd
Showing
2 changed files
with
31 additions
and
24 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from routes import url_for | ||
|
||
from ckan import model | ||
import ckan.new_tests.helpers as helpers | ||
import ckan.new_tests.factories as factories | ||
|
||
|
||
class TestFeedNew(helpers.FunctionalTestBase): | ||
|
||
@classmethod | ||
def setup_class(cls): | ||
helpers.reset_db() | ||
|
||
def setup(self): | ||
model.repo.rebuild_db() | ||
|
||
def test_atom_feed_page_zero_gives_error(self): | ||
group = factories.Group() | ||
offset = url_for(controller='feed', action='group', | ||
id=group['name']) + '?page=0' | ||
app = self._get_test_app() | ||
res = app.get(offset, status=400) | ||
assert '"page" parameter must be a positive integer' in res, res | ||
|
||
def test_atom_feed_page_negative_gives_error(self): | ||
group = factories.Group() | ||
offset = url_for(controller='feed', action='group', | ||
id=group['name']) + '?page=-2' | ||
app = self._get_test_app() | ||
res = app.get(offset, status=400) | ||
assert '"page" parameter must be a positive integer' in res, res |
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