From 6b23ad31e95d792b50f558b6cde8c2bd87d39e2c Mon Sep 17 00:00:00 2001 From: Russell Haering <russell.haering@rackspace.com> Date: Fri, 20 Dec 2013 16:26:16 -0800 Subject: [PATCH] begin adding tests for decom and standby modes --- teeth_agent/tests/decom_agent.py | 27 +++++++++++++++++++++++++++ teeth_agent/tests/standby_agent.py | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 teeth_agent/tests/decom_agent.py create mode 100644 teeth_agent/tests/standby_agent.py diff --git a/teeth_agent/tests/decom_agent.py b/teeth_agent/tests/decom_agent.py new file mode 100644 index 000000000..47729b8e7 --- /dev/null +++ b/teeth_agent/tests/decom_agent.py @@ -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') diff --git a/teeth_agent/tests/standby_agent.py b/teeth_agent/tests/standby_agent.py new file mode 100644 index 000000000..4c72fe6a0 --- /dev/null +++ b/teeth_agent/tests/standby_agent.py @@ -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')