begin adding tests for decom and standby modes
This commit is contained in:
parent
ce845c5875
commit
6b23ad31e9
teeth_agent/tests
27
teeth_agent/tests/decom_agent.py
Normal file
27
teeth_agent/tests/decom_agent.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
"""
|
||||||
|
Copyright 2013 Rackspace, Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from teeth_agent import decom
|
||||||
|
|
||||||
|
|
||||||
|
class TestBaseTeethAgent(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.agent = decom.DecomAgent('fake_host', 'fake_port')
|
||||||
|
|
||||||
|
def test_decom_mode(self):
|
||||||
|
self.assertEqual(self.agent.mode, 'DECOM')
|
27
teeth_agent/tests/standby_agent.py
Normal file
27
teeth_agent/tests/standby_agent.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
"""
|
||||||
|
Copyright 2013 Rackspace, Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from teeth_agent import standby
|
||||||
|
|
||||||
|
|
||||||
|
class TestBaseTeethAgent(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.agent = standby.StandbyAgent('fake_host', 'fake_port')
|
||||||
|
|
||||||
|
def test_standby_mode(self):
|
||||||
|
self.assertEqual(self.agent.mode, 'STANDBY')
|
Loading…
x
Reference in New Issue
Block a user