ranger/orm/tests/unit/rds/utils/test_uuid_utils.py
Nicholas Jones f28a9d276a Move rds tests to top level folder
Moves unit tests from rds subdirectory to orm/tests folder

Change-Id: I47bd556c7f1b801b618d8f12a624d1fcdf7c6ffe
2017-09-14 10:14:25 -05:00

27 lines
940 B
Python
Executable File

"""UUID utils test module."""
class MyResponse(object):
"""A test response class."""
def json(self):
"""Return the test dict."""
return {'uuid': 3}
# class UuidUtilsTest(unittest.TestCase):
# """The main UUID utils test case."""
#
# @mock.patch.object(uuid_utils, 'config')
# @mock.patch.object(uuid_utils.requests, 'post', return_value=MyResponse())
# def test_get_random_uuid_sanity(self, mock_post, mock_config):
# """Test that the function returns the expected value."""
# self.assertEqual(uuid_utils.get_random_uuid(), 3)
#
# @mock.patch.object(uuid_utils, 'config')
# @mock.patch.object(uuid_utils.requests, 'post', side_effect=ValueError(
# 'test'))
# def test_get_random_uuid_exception(self, mock_post, mock_config):
# """Test that the function lets exceptions propagate."""
# self.assertRaises(ValueError, uuid_utils.get_random_uuid)