From c8e23eca583e1e3dd770951e820004a1477c4e11 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 23 May 2015 12:05:56 -0700 Subject: fix template static asset URLs; grammar; line numbers --- docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/quick_tutorial/databases/tutorial') diff --git a/docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt b/docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt index d1fea0d7f..01955ef72 100644 --- a/docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt +++ b/docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt @@ -4,10 +4,12 @@ WikiPage: Add/Edit + href="${request.static_url(reqt)}"> + - -- cgit v1.2.3 From 608f955e20723723f33750211bb12debf613819b Mon Sep 17 00:00:00 2001 From: Karen Dalton Date: Mon, 1 Jun 2015 12:54:43 -0700 Subject: Add additional logging configs necessary for db script output and update tests.py to fix the 'At least one scoped session' warning --- docs/quick_tutorial/databases/tutorial/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/quick_tutorial/databases/tutorial') diff --git a/docs/quick_tutorial/databases/tutorial/tests.py b/docs/quick_tutorial/databases/tutorial/tests.py index e18e70c8c..1e08ef760 100644 --- a/docs/quick_tutorial/databases/tutorial/tests.py +++ b/docs/quick_tutorial/databases/tutorial/tests.py @@ -40,7 +40,6 @@ class WikiViewTests(unittest.TestCase): class WikiFunctionalTests(unittest.TestCase): def setUp(self): - self.session = _initTestingDB() self.config = testing.setUp() from pyramid.paster import get_app app = get_app('development.ini') @@ -48,7 +47,8 @@ class WikiFunctionalTests(unittest.TestCase): self.testapp = TestApp(app) def tearDown(self): - self.session.remove() + from .models import DBSession + DBSession.remove() testing.tearDown() def test_it(self): -- cgit v1.2.3 From cd979b7d0e8a9e17d07fd76dd09ad9ea60cd2c9b Mon Sep 17 00:00:00 2001 From: Karen Dalton Date: Mon, 1 Jun 2015 14:05:51 -0700 Subject: remove some calls to the testing module and self.config as they are not used --- docs/quick_tutorial/databases/tutorial/tests.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'docs/quick_tutorial/databases/tutorial') diff --git a/docs/quick_tutorial/databases/tutorial/tests.py b/docs/quick_tutorial/databases/tutorial/tests.py index 1e08ef760..4aeb718e6 100644 --- a/docs/quick_tutorial/databases/tutorial/tests.py +++ b/docs/quick_tutorial/databases/tutorial/tests.py @@ -23,11 +23,9 @@ def _initTestingDB(): class WikiViewTests(unittest.TestCase): def setUp(self): self.session = _initTestingDB() - self.config = testing.setUp() def tearDown(self): self.session.remove() - testing.tearDown() def test_wiki_view(self): from tutorial.views import WikiViews @@ -40,7 +38,6 @@ class WikiViewTests(unittest.TestCase): class WikiFunctionalTests(unittest.TestCase): def setUp(self): - self.config = testing.setUp() from pyramid.paster import get_app app = get_app('development.ini') from webtest import TestApp @@ -49,7 +46,6 @@ class WikiFunctionalTests(unittest.TestCase): def tearDown(self): from .models import DBSession DBSession.remove() - testing.tearDown() def test_it(self): res = self.testapp.get('/', status=200) -- cgit v1.2.3 From 3da8dd06f1f5ac41b548755f68906d4a0934e3b2 Mon Sep 17 00:00:00 2001 From: Karen Dalton Date: Mon, 1 Jun 2015 14:22:01 -0700 Subject: add self.config = testing.setUp and testing.tearDown back to WikiViewTests as it is a standard pattern for view tests --- docs/quick_tutorial/databases/tutorial/tests.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/quick_tutorial/databases/tutorial') diff --git a/docs/quick_tutorial/databases/tutorial/tests.py b/docs/quick_tutorial/databases/tutorial/tests.py index 4aeb718e6..11e747d15 100644 --- a/docs/quick_tutorial/databases/tutorial/tests.py +++ b/docs/quick_tutorial/databases/tutorial/tests.py @@ -23,9 +23,11 @@ def _initTestingDB(): class WikiViewTests(unittest.TestCase): def setUp(self): self.session = _initTestingDB() + self.config = testing.setUp() def tearDown(self): self.session.remove() + testing.tearDown() def test_wiki_view(self): from tutorial.views import WikiViews -- cgit v1.2.3