Beispiel #1
0
    def save(self):
        """
        Save the incoming request.  This passes the (validated) data on to the RequestApi for processing

        :return:
        """
        self.request = RequestApi.update(self.raw, account=self.account, public_id=self.public_id)
Beispiel #2
0
    def test_01_request_update(self):
        # Create an update Request

        record = RequestFixtureFactory.record()

        acc = BasicAccount()
        acc.id = "test1"

        # without a public id
        r1 = RequestApi.update(record, acc)

        # with a public id
        r2 = RequestApi.update(record, acc, "01010101")

        # now check they were saved correctly
        assert r1 is not None
        assert r2 is not None

        r11 = r1.pull(r1.id)
        assert r11 is not None

        r21 = r2.pull(r2.id)
        assert r21 is not None