def test_fake_data(self):
     num_participants = 6
     num_tips = 25
     num_teams = 5
     fake_data.main(self.db, num_participants, num_tips, num_teams)
     participants = self.db.all("SELECT * FROM participants")
     teams = self.db.all("SELECT * FROM teams")
     payment_instructions = self.db.all("SELECT * FROM payment_instructions")
     assert len(participants) == num_participants
     assert len(teams) == num_teams + 1      # +1 for the fake Gratipay team.
     assert len(payment_instructions) == num_tips
示例#2
0
 def test_fake_data(self):
     num_participants = 6
     num_tips = 25
     num_teams = 5
     fake_data.main(self.db, num_participants, num_tips, num_teams)
     participants = self.db.all("SELECT * FROM participants")
     teams = self.db.all("SELECT * FROM teams")
     payment_instructions = self.db.all(
         "SELECT * FROM payment_instructions")
     assert len(participants) == num_participants
     assert len(teams) == num_teams + 1  # +1 for the fake Gratipay team.
     assert len(payment_instructions) == num_tips
示例#3
0
 def test_fake_data(self):
     num_participants = 5
     num_tips = 5
     num_teams = 1
     num_transfers = 5
     fake_data.main(self.db, num_participants, num_tips, num_teams, num_transfers)
     tips = self.db.all("SELECT * FROM tips")
     participants = self.db.all("SELECT * FROM participants")
     transfers = self.db.all("SELECT * FROM transfers")
     teams = self.db.all("SELECT * FROM teams")
     payment_instructions = self.db.all("SELECT * FROM payment_instructions")
     assert len(tips) == num_tips
     assert len(participants) == num_participants
     assert len(transfers) == num_transfers
     assert len(teams) == num_teams
     if num_tips <= num_participants - num_teams:
         assert len(payment_instructions) == num_tips
     else:
         assert len(payment_instructions) == (num_participants - num_teams)
示例#4
0
 def test_fake_data(self):
     num_participants = 5
     num_tips = 5
     num_teams = 1
     num_transfers = 5
     fake_data.main(self.db, num_participants, num_tips, num_teams,
                    num_transfers)
     tips = self.db.all("SELECT * FROM tips")
     participants = self.db.all("SELECT * FROM participants")
     transfers = self.db.all("SELECT * FROM transfers")
     teams = self.db.all("SELECT * FROM teams")
     payment_instructions = self.db.all(
         "SELECT * FROM payment_instructions")
     assert len(tips) == num_tips
     assert len(participants) == num_participants
     assert len(transfers) == num_transfers
     assert len(teams) == num_teams
     if num_tips <= num_participants - num_teams:
         assert len(payment_instructions) == num_tips
     else:
         assert len(payment_instructions) == (num_participants - num_teams)