Discussion:
[Erp5-dev] packing list container state and container cloneing and deletion
Łukasz Nowak
2008-10-30 13:31:35 UTC
Permalink
Hello,

I've created tests for cases in sale packing lists, when containers are
cloned or deleted. Patch attached.

I updated sequence with new container line in
stepSetContainerFullQuantity, as it is needed for me in more sequences.

What is your opinion? Shall I commit this? (Tests fails for now.)

Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ERP5-tests-testPackingList.py-container-clone-and-delete-packing-state-test.patch
Type: text/x-patch
Size: 6358 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20081030/5bbc2791/attachment.bin>
Robin Sébastien
2008-10-31 12:06:12 UTC
Permalink
Hi,
Post by Łukasz Nowak
Hello,
I've created tests for cases in sale packing lists, when containers are
cloned or deleted. Patch attached.
I updated sequence with new container line in
stepSetContainerFullQuantity, as it is needed for me in more sequences.
Can you please explain what fails currently ? Does it fails because
packing_list_container_worklow is not updated when we clone container or lines
?
Post by Łukasz Nowak
What is your opinion? Shall I commit this? (Tests fails for now.)
You have to take care that the TestPurchasePackingList is included in
testPackingList, and all tests inside testPackingList are also executed for
testPurchasePackingList.

May be you already noticed it, but if you execute testPackingList unit test
with --run_only=test_08a_AddContainersCloneContainer , you will that this test
method will be executed 2 times, one time for TestPackingList, and another
time for TestPurchasePackingList.

For the initial test_08 for containers, there is some kind of hack in the
class TestPurchasePackingListMixin. So having more tests related to containers
is a very nice idea, but it would be nice to move all tests related to
containers in a separated class, either inside testPackingList.py or on
another py file.

Regards.

S?bastien.
Post by Łukasz Nowak
Regards,
Luke
Łukasz Nowak
2008-10-31 12:16:54 UTC
Permalink
Post by Robin Sébastien
Hi,
Post by Łukasz Nowak
Hello,
I've created tests for cases in sale packing lists, when containers are
cloned or deleted. Patch attached.
I updated sequence with new container line in
stepSetContainerFullQuantity, as it is needed for me in more sequences.
Can you please explain what fails currently ? Does it fails because
packing_list_container_worklow is not updated when we clone container or lines
?
Yes - its exactly issues with operation on Container, Container Line and
shall be with Sale Packing List Line/Cell portal types (last are not
covered yet).
Post by Robin Sébastien
Post by Łukasz Nowak
What is your opinion? Shall I commit this? (Tests fails for now.)
You have to take care that the TestPurchasePackingList is included in
testPackingList, and all tests inside testPackingList are also executed for
testPurchasePackingList.
May be you already noticed it, but if you execute testPackingList unit test
with --run_only=test_08a_AddContainersCloneContainer , you will that this test
method will be executed 2 times, one time for TestPackingList, and another
time for TestPurchasePackingList.
For the initial test_08 for containers, there is some kind of hack in the
class TestPurchasePackingListMixin. So having more tests related to containers
is a very nice idea, but it would be nice to move all tests related to
containers in a separated class, either inside testPackingList.py or on
another py file.
Indeed - I've observed such behaviour. So I'll have to wait for
maintainer of this part to create such test and than do any activity in
this field?

Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.
Loading...