Changeset - bb9f62838a29
[Not reviewed]
0 2 0
Lance Edgar (lance) - 2 months ago 2024-08-15 16:38:30
lance@edbob.org
test: fix some tests for 'nodb' scenario
2 files changed with 13 insertions and 6 deletions:
0 comments (0 inline, 0 general)
tests/db/test___init__.py
Show inline comments
 
@@ -2,6 +2,8 @@
 

	
 
from unittest import TestCase
 

	
 
import pytest
 

	
 
from rattail import db as mod
 

	
 

	
tests/trainwreck/test_config.py
Show inline comments
 
@@ -3,11 +3,16 @@
 
from rattail.trainwreck import config as mod
 
from rattail.testing import DataTestCase
 

	
 
try:
 
    import sqlalchemy
 
except ImportError:
 
    pass
 
else:
 

	
 
class TestTrainwreckConfig(DataTestCase):
 
    class TestTrainwreckConfig(DataTestCase):
 

	
 
    def test_configure(self):
 
        self.assertFalse(hasattr(self.config, 'trainwreck_engines'))
 
        ext = mod.TrainwreckConfig()
 
        ext.configure(self.config)
 
        self.assertEqual(self.config.trainwreck_engines, {})
 
        def test_configure(self):
 
            self.assertFalse(hasattr(self.config, 'trainwreck_engines'))
 
            ext = mod.TrainwreckConfig()
 
            ext.configure(self.config)
 
            self.assertEqual(self.config.trainwreck_engines, {})
0 comments (0 inline, 0 general)