def test_api_returns_amount_and_totals(self):

        # First, create some test data
        # We need accounts
        now = utcnow()
        self.make_team("A", is_approved=True)
        self.make_team("B", is_approved=True)
        self.make_participant("alice", claimed_time=now, last_bill_result='')

        # Then, add a $1.50 and $3.00 payment instruction
        response1 = self.client.POST( "/A/payment-instruction.json"
                                    , {'amount': "1.50"}
                                    , auth_as='alice'
                                     )

        response2 = self.client.POST( "/B/payment-instruction.json"
                                    , {'amount': "3.00"}
                                    , auth_as='alice'
                                     )

        # Confirm we get back the right amounts.
        first_data = json.loads(response1.body)
        second_data = json.loads(response2.body)
        assert first_data['amount'] == "1.50"
        assert second_data['amount'] == "3.00"

        # Bring these back when cached values are updated
        assert first_data['total_giving'] == "1.50"
        assert second_data['total_giving'] == "4.50"
Install a module/package into site-packages, and create its scripts.
dataset/ETHPy150Open gratipay/gratipay.com/tests/py/test_payment_instruction_json.py/TestPaymentInstructionJson.test_api_returns_amount_and_totals--crossover with--dataset/ETHPy150Open takluyver/flit/flit/install.py/Installer.install_directly