예제 #1
0
 def test_empty(self):
     self.assertEqual(unique_name('', []), '')
예제 #2
0
 def test_dupe_two(self):
     self.assertEqual(unique_name('bar', [
         'bar',
         'baz',
         'bar-1',
     ]), 'bar-2')
예제 #3
0
 def test_dupe_three(self):
     self.assertEqual(unique_name('bar-2', [
         'bar',
         'baz',
         'bar-2',
     ]), 'bar-3')
예제 #4
0
 def test_missing(self):
     self.assertEqual(unique_name('foo', ['bar', 'baz']), 'foo')
예제 #5
0
 def test_dupe(self):
     self.assertEqual(unique_name('bar', ['bar', 'baz']), 'bar-2')
예제 #6
0
 def test_missing(self):
     self.assertEqual(unique_name('foo', ['bar', 'baz']), 'foo')
예제 #7
0
 def test_empty(self):
     self.assertEqual(unique_name('', []), '')
예제 #8
0
 def test_dupe_three(self):
     self.assertEqual(
         unique_name('bar-2', ['bar', 'baz', 'bar-2',]), 'bar-3')
예제 #9
0
 def test_dupe_two(self):
     self.assertEqual(unique_name('bar', ['bar', 'baz', 'bar-1',]), 'bar-2')
예제 #10
0
 def test_dupe(self):
     self.assertEqual(unique_name('bar', ['bar', 'baz']), 'bar-2')