Skip to content

Commit

Permalink
Code coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjw296 committed Oct 4, 2021
1 parent 6b5c44b commit 69ae30c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from twisted.trial.unittest import TestCase

from carly import Context


class TestContext(TestCase):

def testMultipleCleanupCalls(self):
context = Context()
context.cleanup()
context.cleanup()
14 changes: 14 additions & 0 deletions tests/test_once.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from testfixtures.mock import Mock
from twisted.trial.unittest import TestCase

from carly import Once


class TestOnce(TestCase):

def testSimple(self):
mock = Mock()
wrapped = Once(mock)
wrapped(1, two=3)
wrapped(4, five=6)
mock.assert_called_once_with(1, two=3)

0 comments on commit 69ae30c

Please sign in to comment.