def set_account_allocations(self, allocations): return self.checkout_session._set('accounts', 'allocations', Allocations.serialize(allocations))
def test_serialize(self): self.allocations.add('A', D('10.00')) self.allocations.add('B', D('12.00')) serialized = Allocations.serialize(self.allocations) self.assertEqual(serialized, '{"A": "10.00", "B": "12.00"}')
def set_account_allocations(self, allocations): return self.checkout_session._set("accounts", "allocations", Allocations.serialize(allocations))