forked from whilp/unbound-ec2
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing reverse_zone constructor argument
Add a simple unit test for script functions
- Loading branch information
Ilja Bobkevic
committed
Nov 26, 2015
1 parent
ddb6271
commit 364d2f7
Showing
2 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from tests import unittest | ||
from tests import mock | ||
from unbound_ec2 import script | ||
|
||
class TestAbstractServer(unittest.TestCase): | ||
def setUp(self): | ||
self.id = mock.Mock() | ||
self.cfg = mock.Mock() | ||
script.EC2Connection = mock.MagicMock() | ||
|
||
def tearDown(self): | ||
self.id = None | ||
self.cfg = None | ||
script.EC2Connection = None | ||
|
||
def test_init(self): | ||
script.init(self.id, self.cfg) | ||
|
||
def test_operate(self): | ||
event = mock.Mock() | ||
qstate = mock.MagicMock() | ||
qdata = mock.Mock() | ||
script.operate(self.id, event, qstate, qdata) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters