def test_one_namespace(self) -> None: '''torment.fixtures._unique_class_name({ 'f_{uuid}': None, }, uuid) == 'f_{uuid}_1' ''' n = fixtures._unique_class_name({ 'f_' + self.uuid.hex: None, }, self.uuid) self.assertEqual(n, 'f_' + self.uuid.hex + '_1')
def test_two_namespace(self) -> None: '''torment.fixtures._unique_class_name({ 'f_{uuid}': None, 'f_{uuid}_1': None, }, uuid) == 'f_{uuid}_2' ''' n = fixtures._unique_class_name({ 'f_' + self.uuid.hex: None, 'f_' + self.uuid.hex + '_1': None, }, self.uuid) self.assertEqual(n, 'f_' + self.uuid.hex + '_2')
def test_empty_namespace(self) -> None: '''torment.fixtures._unique_class_name({}, uuid) == 'f_{uuid}' ''' n = fixtures._unique_class_name({}, self.uuid) self.assertEqual(n, 'f_' + self.uuid.hex)