Beispiel #1
0
 def test_get_by_field_multiple(self):
     results = ResultsCollection()
     results.append(BondGirl1())
     results.append(BondGirl2())
     results.append(BondGirl3())
     # Get by location
     london = results.get_by_field('location', 'London')
     self.assertEqual(len(london), 2)
Beispiel #2
0
 def test_get_by_field_multiple(self):
     results = ResultsCollection()
     results.append(BondGirl1())
     results.append(BondGirl2())
     results.append(BondGirl3())
     # Get by location
     london = results.get_by_field('location', 'London')
     self.assertEqual(len(london), 2)
Beispiel #3
0
 def test_get_by_field_single(self):
     results = ResultsCollection()
     results.append(BondGirl1())
     results.append(BondGirl2())
     results.append(BondGirl3())
     # Get by name
     honey = results.get_by_field('name', 'Honey Ryder')
     self.assertEqual(len(honey), 1)
     self.assertEqual(honey[0].name, 'Honey Ryder')
Beispiel #4
0
 def test_get_by_field_single(self):
     results = ResultsCollection()
     results.append(BondGirl1())
     results.append(BondGirl2())
     results.append(BondGirl3())
     # Get by name
     honey = results.get_by_field('name', 'Honey Ryder')
     self.assertEqual(len(honey), 1)
     self.assertEqual(honey[0].name, 'Honey Ryder')