def test_should_inform_last_status_available(self): encomenda = Encomenda(numero='123') encomenda.adicionar_status(Status(data='2009-01-28 17:49:00', local='L1', situacao='Encaminhado')) encomenda.adicionar_status(Status(data='2009-01-29 17:49:00', local='L1', situacao='Encaminhado')) encomenda.adicionar_status(Status(data='2009-01-30 17:49:00', local='L1', situacao='Encaminhado')) assert encomenda.ultimo_status_disponivel().data == '2009-01-30 17:49:00'
def test_should_inform_last_status_available(self): encomenda = Encomenda(numero='123') encomenda.adicionar_status( Status(data='2009-01-28 17:49:00', local='L1', situacao='Encaminhado')) encomenda.adicionar_status( Status(data='2009-01-29 17:49:00', local='L1', situacao='Encaminhado')) encomenda.adicionar_status( Status(data='2009-01-30 17:49:00', local='L1', situacao='Encaminhado')) assert encomenda.ultimo_status_disponivel( ).data == '2009-01-30 17:49:00'
def test_should_return_none_when_theres_no_status_available(self): encomenda = Encomenda(numero='123') assert encomenda.primeiro_status_disponivel() is None assert encomenda.ultimo_status_disponivel() is None
def test_should_return_none_when_theres_no_status_available(self): encomenda = Encomenda(numero='123') assert encomenda.primeiro_status_disponivel() is None assert encomenda.ultimo_status_disponivel() is None