def test_success(self): self.assertIsNone(Venda.query().get()) redirect_response = save(preco='1.01') self.assertIsInstance(redirect_response, RedirectResponse) saved_venda = Venda.query().get() self.assertIsNotNone(saved_venda) self.assertEquals(Decimal('1.01'), saved_venda.preco)
def test_success(self): self.assertIsNone(Venda.query().get()) json_response = rest.new(None, preco='1.01') db_venda = Venda.query().get() self.assertIsNotNone(db_venda) self.assertEquals(Decimal('1.01'), db_venda.preco) self.assert_can_serialize_as_json(json_response)
def __init__(self, status=NOVA, start_cursor=None, offset=0, use_cache=False): super(BuscarVendaPorStatusCmd, self).__init__(Venda.query_by_stats_order_by_creation(status), start_cursor, offset, use_cache)
def __init__(self): super(ListVendaCommand, self).__init__(Venda.query_by_creation())
def __init__(self, status, start_cursor=None, offset=0, use_cache=False): super(BuscarVendaPorStatus, self).__init__(Venda.query_por_status_ordenado_por_data(status), start_cursor, offset, use_cache)