
Moves unit tests from rds subdirectory to orm/tests folder Change-Id: I47bd556c7f1b801b618d8f12a624d1fcdf7c6ffe
27 lines
940 B
Python
Executable File
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)
|