Ignore any non gerrit lines
[integration/test.git] / tools / distchanges / tests / test_gerritquery.py
1 # Copyright (c) 2018 Red Hat, Inc. and others.  All rights reserved.
2 #
3 # This program and the accompanying materials are made available under the
4 # terms of the Eclipse Public License v1.0 which accompanies this distribution,
5 # and is available at http://www.eclipse.org/legal/epl-v10.html
6
7 import logging
8 import unittest
9 from gerritquery import GerritQuery
10 import logg
11
12
13 REMOTE_URL = GerritQuery.remote_url
14 BRANCH = 'stable/oxygen'
15 LIMIT = 10
16 QLIMIT = 50
17 VERBOSE = 0
18 PROJECT = "controller"
19
20
21 class TestRequest(unittest.TestCase):
22     def setUp(self):
23         logg.Logger(logging.DEBUG, logging.INFO)
24         self.gerritquery = GerritQuery(REMOTE_URL, BRANCH, QLIMIT, VERBOSE)
25
26     def test_get_gerrits(self):
27         changeid = "I41232350532e56340c1fe9853ef7e74e3aa03359"
28         gerrits = self.gerritquery.get_gerrits(PROJECT, changeid, 1, status="merged")
29         print("{}".format(gerrits))
30
31
32 if __name__ == '__main__':
33     unittest.main()