def test_joy_and_boom(self, deployment: Deployment): # given deployment.tub.join(Wad.from_number(10)).transact() deployment.tub.mold_cap(Wad.from_number(100000)).transact() deployment.tub.mold_tax(Ray(1000100000000000000000000000)).transact() DSValue(web3=deployment.web3, address=deployment.tub.pip()).poke_with_int(Wad.from_number(250).value).transact() # and deployment.tub.open().transact() deployment.tub.lock(1, Wad.from_number(4)).transact() deployment.tub.draw(1, Wad.from_number(1000)).transact() # when deployment.time_travel_by(3600) deployment.tub.drip().transact() # then assert deployment.skr.balance_of(deployment.our_address) == Wad.from_number(6) assert deployment.tap.joy() == Wad(433303616582911495481) # when deployment.tap.boom(Wad.from_number(1)).transact() # then assert deployment.skr.balance_of(deployment.our_address) == Wad.from_number(5) assert deployment.tap.joy() == Wad(183303616582911495481)
def test_drip_and_chi_and_rho(self, deployment: Deployment): # given deployment.tub.mold_tax(Ray(1000000000000000020000000000)).transact() old_chi = deployment.tub.chi() old_rho = deployment.tub.rho() # when deployment.time_travel_by(1000) deployment.tub.drip().transact() # then assert deployment.tub.chi() > old_chi assert deployment.tub.rho() > old_rho
def deployment(new_deployment: Deployment) -> Deployment: new_deployment.reset() return new_deployment
def new_deployment() -> Deployment: return Deployment()