-
Notifications
You must be signed in to change notification settings - Fork 561
Description
https://github.com/TokenMarketNet/ico/blob/d80e6d1afe8569512e0b53e6e927354ef476b7bf/ico/tests/contracts/test_deploy_acceptance.py#L70-L72
In the code above it can be seen that the date has been hardcoded. Howver, the date has already passed away.
https://github.com/TokenMarketNet/ico/blob/d80e6d1afe8569512e0b53e6e927354ef476b7bf/ico/tests/contracts/test_deploy_acceptance.py#L97-L107
The above mentioned date is used to instantiate PreICOProxyBuyer.
The PreICOProxyBuyer contract has the following states:
https://github.com/TokenMarketNet/ico/blob/d80e6d1afe8569512e0b53e6e927354ef476b7bf/contracts/PreICOProxyBuyer.sol#L74
The getState function has the following logic:
https://github.com/TokenMarketNet/ico/blob/d80e6d1afe8569512e0b53e6e927354ef476b7bf/contracts/PreICOProxyBuyer.sol#L305-L318
and the test has the following assertion:
https://github.com/TokenMarketNet/ico/blob/d80e6d1afe8569512e0b53e6e927354ef476b7bf/ico/tests/contracts/test_deploy_acceptance.py#L107
Since now >= freezeEndsAt, getState will return State.Refunding which has a enum value of 3,
and so the above assertion will fail.
The test was added on 28/08/2017 and the freezeEndsAt date being 20/09/2017, the test might have worked well at the time of adding.
What I don't understand is that this test passed successfully till date, but after upgrading populus the test seems to fail.
how can it be fixed?
Simply set the date to a distant future value.