def _get_prepared_gsp(*args, **kwargs): """ get an instance of GerritStatusPush prepared for testing Hostname and username are "hardcoded", the rest is taken from the provided parameters. """ gsp = GerritStatusPush('host.example.com', 'username', *args, **kwargs) gsp.master = fakemaster.make_master() gsp.master_status = gsp.master.status gsp.sendCodeReview = Mock() return gsp
def _get_prepared_gsp(*args, **kwargs): """ get an instance of GerritStatusPush prepared for testing Hostname and username are "hardcoded", the rest is taken from the provided parameters. """ gsp = GerritStatusPush('host.example.com', 'username', *args, **kwargs) gsp.master = fakemaster.make_master() gsp.master_status = gsp.master.status gsp.sendCodeReview = Mock() return gsp