Ejemplo n.º 1
0
 def test_should_not_abbreviate_next_surname_if_pretty_is_True(self):
     name = 'Álvaro Fernandes de Abreu Justen'
     expected = 'Álvaro F. de Abreu Justen'
     self.assertEquals(abbreviate(name, pretty=True), expected)
     name = 'Rafael da Costa Rodrigues Silva'
     expected = 'Rafael da Costa R. Silva'
     self.assertEquals(abbreviate(name, pretty=True), expected)
Ejemplo n.º 2
0
 def test_should_not_abbreviate_tiny_words(self):
     name = 'Álvaro Fernandes de Abreu Justen'
     expected = 'Álvaro F. de A. Justen'
     self.assertEquals(abbreviate(name), expected)
     name = 'Fulano da Costa e Silva'
     expected = 'Fulano da C. e Silva'
     self.assertEquals(abbreviate(name), expected)
     name = 'Fulano dos Santos'
     expected = 'Fulano dos Santos'
     self.assertEquals(abbreviate(name), expected)
Ejemplo n.º 3
0
 def test_name_with_two_surnames_should_abbreviate_the_middle_one(self):
     name = 'Álvaro Fernandes Justen'
     expected = 'Álvaro F. Justen'
     self.assertEquals(abbreviate(name), expected)
Ejemplo n.º 4
0
 def test_three_surnames_should_abbreviate_the_two_in_the_middle(self):
     name = 'Álvaro Fernandes Abreu Justen'
     expected = 'Álvaro F. A. Justen'
     self.assertEquals(abbreviate(name), expected)
Ejemplo n.º 5
0
 def test_name_and_last_name_should_return_equal(self):
     name = 'Álvaro Justen'
     expected = 'Álvaro Justen'
     self.assertEquals(abbreviate(name), expected)