コード例 #1
0
 def test_d_has_one_dog_returns_false_with_2_dogs(self):
     kennel = Kennel()
     owner = Owner('id', 'first_name', 'last_name', 'birth_date', kennel)
     owner.add_dog('name1', 'breed1', 'gender1', 'favorite_food1')
     owner.add_dog('name2', 'breed2', 'gender2', 'favorite_food2')
     returned = owner.has_one_dog()
     assert returned == False
コード例 #2
0
 def test_c_has_one_dog_returns_true_with_1_dog(self):
     kennel = Kennel()
     owner = Owner('id', 'first_name', 'last_name', 'birth_date', kennel)
     owner.add_dog('name1', 'breed1', 'gender1', 'favorite_food1')
     returned = owner.has_one_dog()
     assert returned == True
コード例 #3
0
 def test_b_has_one_dog_returns_false_with_0_dogs(self):
     kennel = Kennel()
     owner = Owner('id', 'first_name', 'last_name', 'birth_date', kennel)
     returned = owner.has_one_dog()
     assert returned == False