def test_passes_target_on_success(self): called = [] def on_success(res): called.append(res) def on_failure(): assert False maybeinroom(self.goodblob, [self.room], self.info, on_success, on_failure) assert called == [self.target]
def test_calls_on_success(self): called = [] def on_success(res): called.append(True) def on_failure(): assert False maybeinroom(self.goodblob, [self.room], self.info, on_success, on_failure) assert len(called) == 1
def test_passes_target_on_success(self): called = [] def on_success(res): called.append(res) def on_failure(): assert False maybeinroom(self.goodblob, [self.room], self.info, on_success, on_failure) assert called == [self.target]
def test_calls_on_success(self): called = [] def on_success(res): called.append(True) def on_failure(): assert False maybeinroom(self.goodblob, [self.room], self.info, on_success, on_failure) assert len(called) == 1