def test_genParticipantsNumber(self): """ make sure correct number of participants is generated """ for n in [2,6,12]: participants = helpers.genParticipants(n) self.assertEqual(n,len(participants))
def test_genParticipantsHasAttributes(self): """ make sure, that participants have all required attributes """ attributes = ['gender', 'id', 'avec', 'friends'] participants = helpers.genParticipants(4) for p in participants: a = p.keys() self.assertEqual(sorted(attributes), sorted(a))