Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[svn] Added kid default render test and all tests now passing for ren…
…dering. --HG-- branch : trunk
- Loading branch information
bbangert
committed
Jun 4, 2006
1 parent
59314ef
commit 20284b0
Showing
4 changed files
with
30 additions
and
29 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
26 changes: 13 additions & 13 deletions
26
tests/test_webapps/test_files/functional_sample_controller_sample1.py
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,50 +1,50 @@ | ||
from projectname.tests import * | ||
|
||
class TestTest1Controller(TestController): | ||
class TestSampleController(TestController): | ||
def test_root_index(self): | ||
response = self.app.get(url_for(controller='/')) | ||
assert 'Welcome' in response | ||
# Test response... | ||
|
||
def test_index(self): | ||
response = self.app.get(url_for(controller='/test1')) | ||
response = self.app.get(url_for(controller='/sample')) | ||
assert 'basic index page' in response | ||
|
||
def test_session(self): | ||
response = self.app.get(url_for(controller='/test1', action='session_increment')) | ||
response = self.app.get(url_for(controller='/sample', action='session_increment')) | ||
assert response.session.has_key('counter') | ||
assert response.session['counter'] == 0 | ||
|
||
response = self.app.get(url_for(controller='/test1', action='session_increment')) | ||
response = self.app.get(url_for(controller='/sample', action='session_increment')) | ||
assert response.session['counter'] == 1 | ||
assert 'session incrementer' in response | ||
|
||
def test_global(self): | ||
response = self.app.get(url_for(controller='/test1', action='globalup')) | ||
response = self.app.get(url_for(controller='/sample', action='globalup')) | ||
assert 'Hello' in response | ||
|
||
def test_global_persistence(self): | ||
response = self.app.get(url_for(controller='/test1', action='global_store')) | ||
response = self.app.get(url_for(controller='/sample', action='global_store')) | ||
assert '0' in response | ||
|
||
response = self.app.get(url_for(controller='/test1', action='global_store', id=2)) | ||
response = self.app.get(url_for(controller='/sample', action='global_store', id=2)) | ||
assert '2' in response | ||
|
||
response = self.app.get(url_for(controller='/test1', action='global_store')) | ||
response = self.app.get(url_for(controller='/sample', action='global_store')) | ||
assert '2' in response | ||
|
||
response = self.app.get(url_for(controller='/test1', action='global_store', id=3)) | ||
response = self.app.get(url_for(controller='/sample', action='global_store', id=3)) | ||
assert '5' in response | ||
|
||
response = self.app.get(url_for(controller='/test1', action='global_store')) | ||
response = self.app.get(url_for(controller='/sample', action='global_store')) | ||
assert '5' in response | ||
|
||
def test_helper_urlfor(self): | ||
response = self.app.get(url_for(controller='/test1', action='myself')) | ||
assert '/test1/myself' in response | ||
response = self.app.get(url_for(controller='/sample', action='myself')) | ||
assert '/sample/myself' in response | ||
|
||
def test_params(self): | ||
response = self.app.get(url_for(controller='/test1', action='myparams', extra='something', data=4)) | ||
response = self.app.get(url_for(controller='/sample', action='myparams', extra='something', data=4)) | ||
assert 'extra' in response | ||
assert 'something' in response | ||
assert 'data' in response |
8 changes: 4 additions & 4 deletions
8
tests/test_webapps/test_files/functional_sample_controller_sample2.py
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,16 +1,16 @@ | ||
from projectname.tests import * | ||
|
||
class TestTest2Controller(TestController): | ||
class TestSample2Controller(TestController): | ||
def test_session(self): | ||
response = self.app.get(url_for(controller='/test1', action='session_increment')) | ||
response = self.app.get(url_for(controller='/sample', action='session_increment')) | ||
assert response.session.has_key('counter') | ||
assert response.session['counter'] == 0 | ||
|
||
response = self.app.get(url_for(controller='/test1', action='session_increment')) | ||
response = self.app.get(url_for(controller='/sample', action='session_increment')) | ||
assert response.session['counter'] == 1 | ||
assert 'session incrementer' in response | ||
|
||
def test_kid_default(self): | ||
response = self.app.get(url_for(controller='/test1', action='testdefault')) | ||
response = self.app.get(url_for(controller='/sample', action='testdefault')) | ||
assert 'Hello from Kid' in response | ||
|
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