From bc142abc5592975c08319416d0af12c108504887 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Thu, 29 Nov 2012 17:23:28 +0100 Subject: RIP out mongo Since sqlalchemy is providing our database abstraction and we have moved away from Mongo as the underlying database, it is now time to simplify things and rip out mongo. This provides the bulk of the changes, and can stand on its own. There are some followup tasks that can be done, such as removing now unneeded abstraction layers, e.g. db.sql.fake.py --- mediagoblin/tests/test_globals.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mediagoblin/tests/test_globals.py') diff --git a/mediagoblin/tests/test_globals.py b/mediagoblin/tests/test_globals.py index 98f6a436..303f89e2 100644 --- a/mediagoblin/tests/test_globals.py +++ b/mediagoblin/tests/test_globals.py @@ -18,23 +18,20 @@ from nose.tools import assert_raises from mediagoblin import mg_globals + class TestGlobals(object): def setUp(self): - self.old_connection = mg_globals.db_connection self.old_database = mg_globals.database def tearDown(self): - mg_globals.db_connection = self.old_connection mg_globals.database = self.old_database def test_setup_globals(self): mg_globals.setup_globals( - db_connection='my favorite db_connection!', database='my favorite database!', public_store='my favorite public_store!', queue_store='my favorite queue_store!') - assert mg_globals.db_connection == 'my favorite db_connection!' assert mg_globals.database == 'my favorite database!' assert mg_globals.public_store == 'my favorite public_store!' assert mg_globals.queue_store == 'my favorite queue_store!' -- cgit v1.2.3 From 958080be1673bc654adad03abc93a2d7d05c1386 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Wed, 3 Apr 2013 14:05:42 -0500 Subject: All mediagoblin tests now pass with py.test (switched setUp to setup) --- mediagoblin/tests/test_globals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mediagoblin/tests/test_globals.py') diff --git a/mediagoblin/tests/test_globals.py b/mediagoblin/tests/test_globals.py index 303f89e2..d3722140 100644 --- a/mediagoblin/tests/test_globals.py +++ b/mediagoblin/tests/test_globals.py @@ -20,10 +20,10 @@ from mediagoblin import mg_globals class TestGlobals(object): - def setUp(self): + def setup(self): self.old_database = mg_globals.database - def tearDown(self): + def teardown(self): mg_globals.database = self.old_database def test_setup_globals(self): -- cgit v1.2.3 From 7d503a897bddfadcd98d278bdb648503485a19de Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 6 Apr 2013 10:07:47 -0500 Subject: Really removing nosetests things now! all assert_whatever removed --- mediagoblin/tests/test_globals.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mediagoblin/tests/test_globals.py') diff --git a/mediagoblin/tests/test_globals.py b/mediagoblin/tests/test_globals.py index d3722140..fe3088f8 100644 --- a/mediagoblin/tests/test_globals.py +++ b/mediagoblin/tests/test_globals.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from nose.tools import assert_raises +import pytest from mediagoblin import mg_globals @@ -36,7 +36,7 @@ class TestGlobals(object): assert mg_globals.public_store == 'my favorite public_store!' assert mg_globals.queue_store == 'my favorite queue_store!' - assert_raises( + pytest.raises( AssertionError, mg_globals.setup_globals, - no_such_global_foo = "Dummy") + no_such_global_foo="Dummy") -- cgit v1.2.3 From 0536306048daa0970d2e43411ba2a9bf073e570e Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 16 May 2013 17:51:21 -0500 Subject: Always activate testing in every test module ever. Kind of a dorky way to implement this, but... --- mediagoblin/tests/test_globals.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mediagoblin/tests/test_globals.py') diff --git a/mediagoblin/tests/test_globals.py b/mediagoblin/tests/test_globals.py index fe3088f8..dafd71db 100644 --- a/mediagoblin/tests/test_globals.py +++ b/mediagoblin/tests/test_globals.py @@ -17,6 +17,9 @@ import pytest from mediagoblin import mg_globals +from mediagoblin.tools.testing import _activate_testing + +_activate_testing() class TestGlobals(object): -- cgit v1.2.3 From 9a9bafc078192317695a4f06233ea261fe147989 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 17 May 2013 11:12:56 -0500 Subject: Reverting "Always activate testing in every test module ever." Revert "Always activate testing in every test module ever." This reverts commit 0536306048daa0970d2e43411ba2a9bf073e570e. --- mediagoblin/tests/test_globals.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'mediagoblin/tests/test_globals.py') diff --git a/mediagoblin/tests/test_globals.py b/mediagoblin/tests/test_globals.py index dafd71db..fe3088f8 100644 --- a/mediagoblin/tests/test_globals.py +++ b/mediagoblin/tests/test_globals.py @@ -17,9 +17,6 @@ import pytest from mediagoblin import mg_globals -from mediagoblin.tools.testing import _activate_testing - -_activate_testing() class TestGlobals(object): -- cgit v1.2.3