Merge "Bump minimum os-testr requirement to 1.0.0"
This commit is contained in:
commit
7eddc73f7e
1
.gitignore
vendored
1
.gitignore
vendored
@ -32,6 +32,7 @@ pip-log.txt
|
||||
nosetests.xml
|
||||
.coverage
|
||||
.tox
|
||||
.stestr/
|
||||
.testrepository
|
||||
.venv
|
||||
|
||||
|
2
.stestr.conf
Normal file
2
.stestr.conf
Normal file
@ -0,0 +1,2 @@
|
||||
[DEFAULT]
|
||||
test_path=./storyboard/tests
|
@ -19,9 +19,9 @@ import stat
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
import mock_smtp as mock
|
||||
from storyboard.plugin.email.base import EmailPluginBase
|
||||
from storyboard.tests import base
|
||||
from storyboard.tests import mock_smtp as mock
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -28,7 +28,7 @@ class TestEmailFactory(base.TestCase):
|
||||
factory = EmailFactory('test@example.org',
|
||||
'test_subject.txt',
|
||||
'test.txt',
|
||||
'plugin.email')
|
||||
'storyboard.tests.plugin.email')
|
||||
|
||||
msg = factory.build('test_recipient@example.org',
|
||||
test_parameter='value')
|
||||
@ -60,7 +60,7 @@ class TestEmailFactory(base.TestCase):
|
||||
factory = EmailFactory('test@example.org',
|
||||
'test_subject.txt',
|
||||
'test.txt',
|
||||
'plugin.email')
|
||||
'storyboard.tests.plugin.email')
|
||||
custom_headers = {
|
||||
'X-Custom-Header': 'test-header-value'
|
||||
}
|
||||
@ -85,7 +85,7 @@ class TestEmailFactory(base.TestCase):
|
||||
factory = EmailFactory('test@example.org',
|
||||
'test_subject.txt',
|
||||
'test.txt',
|
||||
'plugin.email')
|
||||
'storyboard.tests.plugin.email')
|
||||
msg = factory.build('test_recipient@example.org',
|
||||
test_parameter='value')
|
||||
self.assertEqual('value', msg.get('Subject'))
|
||||
@ -94,7 +94,7 @@ class TestEmailFactory(base.TestCase):
|
||||
factory = EmailFactory('test@example.org',
|
||||
'test_long_subject.txt',
|
||||
'test.txt',
|
||||
'plugin.email')
|
||||
'storyboard.tests.plugin.email')
|
||||
msg = factory.build('test_recipient@example.org',
|
||||
test_parameter='value')
|
||||
self.assertEqual(78, len(msg.get('Subject')))
|
||||
@ -104,7 +104,7 @@ class TestEmailFactory(base.TestCase):
|
||||
factory = EmailFactory('test@example.org',
|
||||
'test_subject_newline.txt',
|
||||
'test.txt',
|
||||
'plugin.email')
|
||||
'storyboard.tests.plugin.email')
|
||||
msg = factory.build('test_recipient@example.org',
|
||||
test_parameter='value')
|
||||
self.assertEqual('with newline', msg.get('Subject'))
|
||||
@ -117,7 +117,7 @@ class TestEmailFactory(base.TestCase):
|
||||
factory = EmailFactory('test@example.org',
|
||||
'test_subject.txt',
|
||||
'test.txt',
|
||||
'plugin.email')
|
||||
'storyboard.tests.plugin.email')
|
||||
factory.add_text_template('test.html', 'html')
|
||||
|
||||
msg = factory.build('test_recipient@example.org',
|
||||
@ -147,7 +147,7 @@ class TestEmailFactory(base.TestCase):
|
||||
EmailFactory('test@example.org',
|
||||
'invalid_subject.txt',
|
||||
'invalid.txt',
|
||||
'plugin.email')
|
||||
'storyboard.tests.plugin.email')
|
||||
self.assertFalse(True)
|
||||
except TemplateNotFound:
|
||||
self.assertFalse(False)
|
||||
@ -156,7 +156,7 @@ class TestEmailFactory(base.TestCase):
|
||||
factory = EmailFactory('test@example.org',
|
||||
'test_subject.txt',
|
||||
'test.txt',
|
||||
'plugin.email')
|
||||
'storyboard.tests.plugin.email')
|
||||
factory.add_text_template('invalid.html', 'html')
|
||||
self.assertFalse(True)
|
||||
except TemplateNotFound:
|
||||
|
@ -14,9 +14,9 @@
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
import mock_smtp as mock
|
||||
from storyboard.plugin.email.smtp_client import get_smtp_client
|
||||
from storyboard.tests import base
|
||||
from storyboard.tests import mock_smtp as mock
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -22,8 +22,9 @@ class TestSchedulerBasePlugin(base.TestCase):
|
||||
def test_plugin_name(self):
|
||||
plugin = TestPlugin(dict())
|
||||
|
||||
self.assertEqual("plugin.scheduler.test_base:TestPlugin",
|
||||
plugin.get_name())
|
||||
self.assertEqual(
|
||||
"storyboard.tests.plugin.scheduler.test_base:TestPlugin",
|
||||
plugin.get_name())
|
||||
|
||||
|
||||
class TestPlugin(SchedulerPluginBase):
|
||||
|
@ -20,11 +20,10 @@ from apscheduler.triggers.interval import IntervalTrigger
|
||||
from oslo_config import cfg
|
||||
from stevedore.extension import Extension
|
||||
|
||||
from plugin.scheduler.mock_plugin import MockPlugin
|
||||
|
||||
from storyboard.plugin.base import StoryboardPluginLoader
|
||||
import storyboard.plugin.scheduler as scheduler
|
||||
import storyboard.tests.base as base
|
||||
from storyboard.tests.plugin.scheduler.mock_plugin import MockPlugin
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -6,7 +6,7 @@ mock>=1.0
|
||||
python-subunit
|
||||
oslo.sphinx
|
||||
oslotest>=1.2.0
|
||||
os-testr==0.8.2
|
||||
os-testr>=1.0.0
|
||||
testrepository>=0.0.18
|
||||
testscenarios>=0.4,<0.5
|
||||
testtools>=0.9.34
|
||||
|
Loading…
Reference in New Issue
Block a user