Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-rt for openSUSE:Factory checked in at 2022-04-17 23:50:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-rt (Old) and /work/SRC/openSUSE:Factory/.python-rt.new.1941 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rt" Sun Apr 17 23:50:14 2022 rev:12 rq:970418 version:2.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-rt/python-rt.changes 2021-12-05 22:46:26.525577440 +0100 +++ /work/SRC/openSUSE:Factory/.python-rt.new.1941/python-rt.changes 2022-04-17 23:51:52.274474054 +0200 @@ -1,0 +2,7 @@ +Sat Apr 9 07:30:39 UTC 2022 - Sebastian Wagner <[email protected]> + +- Update to version 2.2.2: + - Fix bug in the get_ticket would omit certain fields in case they were empty instead of returning an empty list as was the previous behavior (#70). + - Add tests for verifying correct return result for AdminCc, Cc and Requestor fields. + +------------------------------------------------------------------- Old: ---- rt-2.2.1.tar.gz New: ---- rt-2.2.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rt.spec ++++++ --- /var/tmp/diff_new_pack.cvSmsH/_old 2022-04-17 23:51:52.670474597 +0200 +++ /var/tmp/diff_new_pack.cvSmsH/_new 2022-04-17 23:51:52.678474608 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-rt # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ # Tests require internet connection %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-rt -Version: 2.2.1 +Version: 2.2.2 Release: 0 Summary: Python interface to Request Tracker API License: GPL-3.0-only ++++++ rt-2.2.1.tar.gz -> rt-2.2.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/.codebeatignore new/rt-2.2.2/.codebeatignore --- old/rt-2.2.1/.codebeatignore 1970-01-01 01:00:00.000000000 +0100 +++ new/rt-2.2.2/.codebeatignore 2022-04-08 13:47:17.000000000 +0200 @@ -0,0 +1 @@ +test_rt.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/.github/workflows/nosetests.yml new/rt-2.2.2/.github/workflows/nosetests.yml --- old/rt-2.2.1/.github/workflows/nosetests.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/rt-2.2.2/.github/workflows/nosetests.yml 2022-04-08 13:47:17.000000000 +0200 @@ -0,0 +1,39 @@ +name: Run nose tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + services: + rt: + image: netsandbox/request-tracker:5.0 + ports: + - 8080:8080 + env: + RT_WEB_PORT: 8080 + + strategy: + matrix: + python-version: [3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e .[test] + - name: Test with nosetests + run: | + nosetests --with-coverage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/CHANGES new/rt-2.2.2/CHANGES --- old/rt-2.2.1/CHANGES 2021-11-26 02:20:08.000000000 +0100 +++ new/rt-2.2.2/CHANGES 2022-04-08 13:47:17.000000000 +0200 @@ -1,3 +1,7 @@ +v2.2.2, 2022-04-08 +- Fix bug in the get_ticket would omit certain fields in case they were empty instead of returning an empty list as was the previous behavior (#70). +- Add tests for verifying correct return result for AdminCc, Cc and Requestor fields. + v2.2.1, 2021-11-26 - Fix bug in get_attachment_content which was a workaround for a bug in RT <=4.2 (trailing new-lines) but which was fixed in RT >=4.2. This made tests fail and return falsely stripped attachment content. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/PKG-INFO new/rt-2.2.2/PKG-INFO --- old/rt-2.2.1/PKG-INFO 2021-11-26 02:20:23.768269500 +0100 +++ new/rt-2.2.2/PKG-INFO 2022-04-08 13:47:39.899604800 +0200 @@ -1,11 +1,11 @@ Metadata-Version: 2.1 Name: rt -Version: 2.2.1 +Version: 2.2.2 Summary: Python interface to Request Tracker API Home-page: https://github.com/python-rt/python-rt Author: Georges Toth Author-email: [email protected] -License: GNU General Public License (GPL) +License: GNU General Public License v3 (GPLv3) Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console @@ -23,12 +23,12 @@ Provides-Extra: test License-File: LICENSE - .. image:: https://codebeat.co/badges/a52cfe15-b824-435b-a594-4bf2be2fb06f :target: https://codebeat.co/projects/github-com-python-rt-python-rt-master :alt: codebeat badge -.. image:: https://travis-ci.org/CZ-NIC/python-rt.svg?branch=master - :target: https://travis-ci.org/CZ-NIC/python-rt +.. image:: https://github.com/python-rt/python-rt/actions/workflows/nosetests.yml/badge.svg + :target: https://github.com/python-rt/python-rt/actions/workflows/nosetests.yml + :alt: tests .. image:: https://readthedocs.org/projects/python-rt/badge/?version=latest :target: https://python-rt.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/README.rst new/rt-2.2.2/README.rst --- old/rt-2.2.1/README.rst 2021-11-26 02:20:08.000000000 +0100 +++ new/rt-2.2.2/README.rst 2022-04-08 13:47:17.000000000 +0200 @@ -1,9 +1,9 @@ - .. image:: https://codebeat.co/badges/a52cfe15-b824-435b-a594-4bf2be2fb06f :target: https://codebeat.co/projects/github-com-python-rt-python-rt-master :alt: codebeat badge -.. image:: https://travis-ci.org/CZ-NIC/python-rt.svg?branch=master - :target: https://travis-ci.org/CZ-NIC/python-rt +.. image:: https://github.com/python-rt/python-rt/actions/workflows/nosetests.yml/badge.svg + :target: https://github.com/python-rt/python-rt/actions/workflows/nosetests.yml + :alt: tests .. image:: https://readthedocs.org/projects/python-rt/badge/?version=latest :target: https://python-rt.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/rt/rt.py new/rt-2.2.2/rt/rt.py --- old/rt-2.2.1/rt/rt.py 2021-11-26 02:20:08.000000000 +0100 +++ new/rt-2.2.2/rt/rt.py 2022-04-08 13:47:17.000000000 +0200 @@ -278,6 +278,8 @@ _msg = msg else: raise ValueError('Invalid parameter type.') + if not _msg: + return [] return list(map(lambda x: x.strip(), _msg.split(","))) @classmethod @@ -337,7 +339,7 @@ raise UnexpectedMessageFormat( "Missing line starting with `{}:`.".format(key), ) - return {key: '\n'.join(lines) for key, lines in fields.items() if lines} + return {key: '\n'.join(lines) for key, lines in fields.items()} @classmethod def __parse_response_numlist(cls, msg: typing.Iterable[str], @@ -360,7 +362,7 @@ ) @classmethod - def __parse_response_ticket(cls, msg: typing.Iterable[str]) -> typing.Dict[str, typing.Sequence[str]]: + def __parse_response_ticket(cls, msg: typing.Iterable[str]) -> typing.Dict[str, typing.Union[str, typing.Sequence[str]]]: """Parse an RT API ticket response into a Python dictionary :keyword msg: A multiline string, or an iterable of string lines, with diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/rt.egg-info/PKG-INFO new/rt-2.2.2/rt.egg-info/PKG-INFO --- old/rt-2.2.1/rt.egg-info/PKG-INFO 2021-11-26 02:20:23.000000000 +0100 +++ new/rt-2.2.2/rt.egg-info/PKG-INFO 2022-04-08 13:47:39.000000000 +0200 @@ -1,11 +1,11 @@ Metadata-Version: 2.1 Name: rt -Version: 2.2.1 +Version: 2.2.2 Summary: Python interface to Request Tracker API Home-page: https://github.com/python-rt/python-rt Author: Georges Toth Author-email: [email protected] -License: GNU General Public License (GPL) +License: GNU General Public License v3 (GPLv3) Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console @@ -23,12 +23,12 @@ Provides-Extra: test License-File: LICENSE - .. image:: https://codebeat.co/badges/a52cfe15-b824-435b-a594-4bf2be2fb06f :target: https://codebeat.co/projects/github-com-python-rt-python-rt-master :alt: codebeat badge -.. image:: https://travis-ci.org/CZ-NIC/python-rt.svg?branch=master - :target: https://travis-ci.org/CZ-NIC/python-rt +.. image:: https://github.com/python-rt/python-rt/actions/workflows/nosetests.yml/badge.svg + :target: https://github.com/python-rt/python-rt/actions/workflows/nosetests.yml + :alt: tests .. image:: https://readthedocs.org/projects/python-rt/badge/?version=latest :target: https://python-rt.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/rt.egg-info/SOURCES.txt new/rt-2.2.2/rt.egg-info/SOURCES.txt --- old/rt-2.2.1/rt.egg-info/SOURCES.txt 2021-11-26 02:20:23.000000000 +0100 +++ new/rt-2.2.2/rt.egg-info/SOURCES.txt 2022-04-08 13:47:39.000000000 +0200 @@ -1,3 +1,4 @@ +.codebeatignore .gitignore .pylintrc .readthedocs.yaml @@ -12,6 +13,7 @@ setup.py test_rt.py .github/workflows/codeql-analysis.yml +.github/workflows/nosetests.yml .github/workflows/pythonpublish.yml doc/Makefile doc/conf.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/setup.cfg new/rt-2.2.2/setup.cfg --- old/rt-2.2.1/setup.cfg 2021-11-26 02:20:23.768269500 +0100 +++ new/rt-2.2.2/setup.cfg 2022-04-08 13:47:39.903604700 +0200 @@ -6,7 +6,7 @@ description = Python interface to Request Tracker API long_description = file: README.rst long_description_content_type = text/x-rst -license = GNU General Public License (GPL) +license = GNU General Public License v3 (GPLv3) license_file = LICENSE author = Georges Toth author_email = [email protected] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rt-2.2.1/test_rt.py new/rt-2.2.2/test_rt.py --- old/rt-2.2.1/test_rt.py 2021-11-26 02:20:08.000000000 +0100 +++ new/rt-2.2.2/test_rt.py 2022-04-08 13:47:17.000000000 +0200 @@ -186,6 +186,59 @@ # get user self.assertIn('@', tracker.get_user(default_login)['EmailAddress']) + @unittest.skipUnless(_have_creds(RT_VALID_CREDENTIALS), + "missing credentials required to run test") + def test_ticket_operations_admincc_cc(self): + ticket_subject = 'Testing issue ' + "".join([random.choice(string.ascii_letters) for i in range(15)]) + ticket_text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + for name in ('RT4.4 stable',): + url = self.RT_VALID_CREDENTIALS[name]['url'] + default_login = self.RT_VALID_CREDENTIALS[name]['support']['default_login'] + default_password = self.RT_VALID_CREDENTIALS[name]['support']['default_password'] + tracker = rt.Rt(url, default_login=default_login, default_password=default_password) + self.assertTrue(tracker.login(), 'Invalid login to RT demo site ' + name) + + ticket_id = tracker.create_ticket(Subject=ticket_subject, Text=ticket_text) + self.assertTrue(ticket_id > -1, 'Creating ticket failed.') + + # make sure Requestors, AdminCc and Cc are present and an empty list, as would be expected + ticket = tracker.get_ticket(ticket_id) + self.assertTrue(len(ticket['Requestors']) >= 0) + self.assertTrue(len(ticket['AdminCc']) >= 0) + self.assertTrue(len(ticket['Cc']) >= 0) + + # set requestors + requestors = ['[email protected]', '[email protected]'] + tracker.edit_ticket(ticket_id, Status='open', Requestors=requestors) + # verify + ticket = tracker.get_ticket(ticket_id) + self.assertListEqual(requestors, ticket['Requestors']) + + # set admincc + admincc = ['[email protected]', '[email protected]'] + tracker.edit_ticket(ticket_id, Status='open', AdminCc=admincc) + # verify + ticket = tracker.get_ticket(ticket_id) + self.assertListEqual(requestors, ticket['Requestors']) + self.assertListEqual(admincc, ticket['AdminCc']) + + # update admincc + admincc = ['[email protected]', '[email protected]', '[email protected]'] + tracker.edit_ticket(ticket_id, Status='open', AdminCc=admincc) + # verify + ticket = tracker.get_ticket(ticket_id) + self.assertListEqual(requestors, ticket['Requestors']) + self.assertListEqual(admincc, ticket['AdminCc']) + + # unset requestors and admincc + requestors = [] + admincc = [] + tracker.edit_ticket(ticket_id, Status='open', Requestors=requestors, AdminCc=admincc) + # verify + ticket = tracker.get_ticket(ticket_id) + self.assertListEqual(requestors, ticket['Requestors']) + self.assertListEqual(admincc, ticket['AdminCc']) + if __name__ == '__main__': unittest.main()
