def print_time_tracking_info( token, login, password, repo, committer, issue, milestone, total): """Print time/budget info""" pprint_header(repo_name=repo, issue=issue, milestone=milestone) config = Config() data_source = config.get_backend()(token=token, login=login, password=password) click.echo("Loading...") if total: result = get_total_stats( data_source, repo, committer, issue, milestone) pprint_stats(result) else: result = get_entries_list( data_source, repo, committer, issue, milestone) for entry in result['entries']: pprint_entry(entry, committer)
def test_get_total_usecase(self, input_data): data_source = MockSource() result = get_total_stats(data_source, "test", **input_data) assert result["result"] == Result.OK