Bug 1092464 - TestCase search is_automated doesn't work properly
Summary: TestCase search is_automated doesn't work properly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nitrate
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Šplíchal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-29 11:31 UTC by Jan Ščotka
Modified: 2016-06-01 01:47 UTC (History)
2 users (show)

Fixed In Version: python-nitrate-1.1-0.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-22 07:55:37 UTC
Type: Bug


Attachments (Terms of Use)

Description Jan Ščotka 2014-04-29 11:31:34 UTC
Hi,
see differences in output of two commands in python shell

$ nitrate
>>> test="/CoreOS/net-snmp/Regression/bz714976-usr-share-snmp-mibs-index-is-a-cache-file-and-should-be-marked-as-such"

>>> TestCase.search(script=test, is_automated=True)
[]
>>> [x for x in TestCase.search(script=test) if x.automated==True]
[TestCase(120838)]


it is caused by TCMS automated string. this case contains checked both automated and manual, what causes inconsistent troubles with datatypes,
x.automated is set to True in testcase, but it is unable to search to is_automated, because for example in TCMS webpages it is marked with strig "Both"

It is somehow solvable?
    Thanks&Regards
    Honza

Comment 1 Petr Šplíchal 2014-05-17 11:57:27 UTC
Unfortunately the mapping between xmlrpc (database layout) and
python-nitrate attributes is not 1:1. There are some differences
like the attributes related to automated/manual. For this case the
mapping looks like this (extracted from the code):

    if automated and manual:
        hash["is_automated"] = 2
    elif automated:
        hash["is_automated"] = 1
    else:
        hash["is_automated"] = 0

I tried to resolve this particular case by mapping "manual" and
"automated" to appropriate is_automated values:
https://github.com/psss/python-nitrate/commit/3de5e45e575400474

So now it's possible to perform the following searches:
>>> TestCase.search(automated=True)
>>> TestCase.search(automated=True, manual=False)

Hope this helps.

Comment 2 Jaroslav Reznik 2015-03-03 17:13:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 3 Petr Šplíchal 2016-02-10 12:44:01 UTC
Latest packages for testing available in the copr repository:
https://copr.fedorainfracloud.org/coprs/psss/python-nitrate/

Comment 4 Fedora Update System 2016-02-10 17:20:09 UTC
python-nitrate-1.3-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-687d19409b

Comment 5 Fedora Update System 2016-02-10 18:22:43 UTC
python-nitrate-1.3-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-2bb9364c32

Comment 6 Fedora Update System 2016-02-10 18:50:47 UTC
python-nitrate-1.3-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7474e957a9

Comment 7 Fedora Update System 2016-02-10 23:54:16 UTC
python-nitrate-1.3-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-35a106d076

Comment 8 Fedora Update System 2016-02-21 02:22:08 UTC
python-nitrate-1.3-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-02-21 16:27:23 UTC
python-nitrate-1.3-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-02-27 02:01:10 UTC
python-nitrate-1.3-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2016-02-27 02:07:57 UTC
python-nitrate-1.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.