begin adding tests for decom and standby modes

This commit is contained in:
Russell Haering 2013-12-20 16:26:16 -08:00
parent ce845c5875
commit 6b23ad31e9
2 changed files with 54 additions and 0 deletions

@ -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')

@ -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')