def testunit_get_xid_names_WHEN_pw_name_IS_invalid(self, mock_getpwuid): vs_resource_backend._VS_PREFIX_DIR = self._testdata_dir mock_getpwuid.return_value = pwd.struct_pwent(( '', '*', 515, 505, 1, '/home/mlab_utility', '/bin/bash')) expected_value = {} returned_value = vs_resource_backend.get_xid_names() self.assertDictEqual(expected_value, returned_value)
def testunit_get_xid_names_WHEN_pw_name_IS_invalid(self, mock_getpwuid): vs_resource_backend._VS_PREFIX_DIR = self._testdata_dir mock_getpwuid.return_value = pwd.struct_pwent( ('', '*', 515, 505, 1, '/home/mlab_utility', '/bin/bash')) expected_value = {} returned_value = vs_resource_backend.get_xid_names() self.assertDictEqual(expected_value, returned_value)