Skip to content

Commit

Permalink
Added interface-verification tests for managers
Browse files Browse the repository at this point in the history
  • Loading branch information
jimfulton committed Oct 20, 2018
1 parent 36a77fc commit 3d06a6d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions transaction/tests/test__manager.py
Expand Up @@ -14,6 +14,10 @@
import mock
import unittest

import zope.interface.verify

from .. import interfaces


class TransactionManagerTests(unittest.TestCase):

Expand All @@ -32,6 +36,10 @@ def _makePopulated(self):
nosub1 = DataObject(mgr, nost=1)
return mgr, sub1, sub2, sub3, nosub1

def test_interface(self):
zope.interface.verify.verifyObject(interfaces.ITransactionManager,
self._makeOne())

def test_ctor(self):
tm = self._makeOne()
self.assertTrue(tm._txn is None)
Expand Down Expand Up @@ -698,6 +706,11 @@ def run(self):

class TestThreadTransactionManager(unittest.TestCase):

def test_interface(self):
import transaction
zope.interface.verify.verifyObject(interfaces.ITransactionManager,
transaction.manager)

def test_sync_registration_thread_local_manager(self):
import transaction

Expand Down

0 comments on commit 3d06a6d

Please sign in to comment.