Ejemplo n.º 1
0
    def test_fullname_is_only_first_or_lastname_if_other_is_missing(self):
        billy = User("billyj", firstname="billy")
        self.assertEquals('billy', billy.fullname())

        johnson = User("billyj", lastname="johnson")
        self.assertEquals('johnson', johnson.fullname())
Ejemplo n.º 2
0
 def test_fullname_is_userid_if_no_name_given(self):
     billyj = User("billyj")
     self.assertEquals('billyj', billyj.fullname())
Ejemplo n.º 3
0
 def test_fullname_is_first_and_lastname(self):
     billy = User("billyj", firstname="billy", lastname="johnson")
     self.assertEquals('johnson billy', billy.fullname())