def test_post(self):

        self.make_participant("alice", claimed_time='now')
        Enterprise = self.make_team("The Enterprise", is_approved=True)
        Trident = self.make_team("The Trident", is_approved=True)

        request_body = [
            { 'amount': "1.50", 'team_slug': Enterprise.slug },
            { 'amount': "39.50", 'team_slug': Trident.slug }
        ]

        response = self.client.POST( "~/alice/payment-instructions.json"
                                    , body=json.dumps(request_body)
                                    , content_type='application/json'
                                    , auth_as='alice')

        assert response.code == 200

        # Make sure apt response returned.
        data = json.loads(response.body)

        assert len(data) == 2

        assert data[0]['team_slug'] == Enterprise.slug
        assert data[0]['team_name'] == Enterprise.name
        assert data[0]['amount'] == '1.50'

        assert data[1]['team_slug'] == Trident.slug
        assert data[1]['team_name'] == Trident.name
        assert data[1]['amount'] == '39.50'

        for d in data:
            assert 'due' in d
            assert 'ctime' in d
            assert 'mtime' in d

        # Make sure actually written to database.
        data = json.loads(self.client.GET(
             "~/alice/payment-instructions.json", auth_as='alice').body)

        assert data[0]['team_slug'] == Trident.slug
        assert data[0]['amount'] == '39.50'

        assert data[1]['team_slug'] == Enterprise.slug
        assert data[1]['amount'] == '1.50'
Test that POST to this endpoint works correctly.
dataset/ETHPy150Open gratipay/gratipay.com/tests/py/test_payment_instructions_json.py/TestPaymentInstructionApi.test_post