def create_default_trade():
    pokemon1 = {'name': 'pikachu', 'base_experience': 112, 'image': 'url'}
    pokemon2 = {'name': 'charmander', 'base_experience': 62, 'image': 'url'}
    trade = Trade()
    trade.right_side = [pokemon1, pokemon2]
    trade.left_side = [pokemon1, pokemon2]
    trade.result = trade.is_fair()

    return trade
Esempio n. 2
0
    def test_is_fair_only_experience(self):
        self.assertTrue(fairness.is_fair(trade))
        pokemon1 = {'name': 'pikachu', 'base_experience': 112, 'image': 'url'}
        pokemon2 = {
            'name': 'charmander',
            'base_experience': 62,
            'image': 'url'
        }
        trade2 = Trade()
        trade2.left_side = [pokemon1]
        trade2.right_side = [pokemon2]

        self.assertFalse(fairness.is_fair(trade2))