X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tools%2Fdistchanges%2Ftests%2Ftest_gerritquery.py;fp=tools%2Fdistchanges%2Ftests%2Ftest_gerritquery.py;h=86daf3ae230e9f3852d854c528bd9873a9c9992e;hb=605ceec45e75d1e008131e1fec051e29ef71cc50;hp=0000000000000000000000000000000000000000;hpb=4a40e16a42945cbed78c5d26541ab2f96fb2fd34;p=integration%2Ftest.git diff --git a/tools/distchanges/tests/test_gerritquery.py b/tools/distchanges/tests/test_gerritquery.py new file mode 100644 index 0000000000..86daf3ae23 --- /dev/null +++ b/tools/distchanges/tests/test_gerritquery.py @@ -0,0 +1,33 @@ +# Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v1.0 which accompanies this distribution, +# and is available at http://www.eclipse.org/legal/epl-v10.html + +import logging +import unittest +from gerritquery import GerritQuery +import logg + + +REMOTE_URL = GerritQuery.remote_url +BRANCH = 'stable/oxygen' +LIMIT = 10 +QLIMIT = 50 +VERBOSE = 0 +PROJECT = "controller" + + +class TestRequest(unittest.TestCase): + def setUp(self): + logg.Logger(logging.DEBUG, logging.INFO) + self.gerritquery = GerritQuery(REMOTE_URL, BRANCH, QLIMIT, VERBOSE) + + def test_get_gerrits(self): + changeid = "I41232350532e56340c1fe9853ef7e74e3aa03359" + gerrits = self.gerritquery.get_gerrits(PROJECT, changeid, 1, status="merged") + print("{}".format(gerrits)) + + +if __name__ == '__main__': + unittest.main()