Bug 1304295 - TestPlan missing two private attributes due to typo
TestPlan missing two private attributes due to typo
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: python-nitrate (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Šplíchal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-03 04:38 EST by Leos Pol
Modified: 2016-05-31 21:47 EDT (History)
2 users (show)

See Also:
Fixed In Version: python-nitrate-1.3-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-15 03:09:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Leos Pol 2016-02-03 04:38:23 EST
Description of problem:
Class nitrate.mutable.TestPlan missing attributes _caseplans and _children. This results into AttributeError exception whenever I try to access TestPlan instance properties caseplans and children.

Version-Release number of selected component (if applicable):
python-nitrate-1.2-0.fc22

How reproducible:
always

Steps to Reproduce:
In [1]: import nitrate
In [2]: nitrate.TestPlan(1).caseplans
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-41b1103bc9d7> in <module>()
----> 1 nitrate.TestPlan(1).caseplans

/usr/lib/python2.7/site-packages/nitrate/base.pyc in getter(self)
     61     def getter(self):
     62         # Initialize the attribute unless already done
---> 63         if getattr(self, "_" + field) is NitrateNone:
     64             self._fetch()
     65         # Return self._field

AttributeError: 'TestPlan' object has no attribute '_caseplans'

In [3]: nitrate.TestPlan(1)._attributes
Out[3]: 
['author',
 'caseplanschildren',
 'components',
 'name',
 'owner',
 'parent',
 'product',
 'status',
 'tags',
 'testcases',
 'testruns',
 'type',
 'version']

Actual results:
Traceback
"caseplanschildren" in _attributes

Expected results:
fetching caseplans
"caseplans" and "children" in _attributes

Additional info:
Comment 1 Leos Pol 2016-02-03 04:54:03 EST
Pull request:
https://github.com/psss/python-nitrate/pull/4
Comment 2 Petr Šplíchal 2016-02-09 12:17:53 EST
Thanks for the patch, Leoš. Merged into master:
https://github.com/psss/python-nitrate/commit/c2063b5
Comment 3 Fedora Update System 2016-02-10 06:51:46 EST
python-nitrate-1.3-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-687d19409b
Comment 4 Fedora Update System 2016-02-10 06:55:53 EST
python-nitrate-1.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-35a106d076
Comment 5 Fedora Update System 2016-02-10 06:57:34 EST
python-nitrate-1.3-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-2bb9364c32
Comment 6 Fedora Update System 2016-02-10 06:58:23 EST
python-nitrate-1.3-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7474e957a9
Comment 7 Petr Šplíchal 2016-02-10 07:50:34 EST
Latest packages for testing available in the copr repository:
https://copr.fedorainfracloud.org/coprs/psss/python-nitrate/
Comment 8 Leos Pol 2016-02-10 08:58:19 EST
With python-nitrate-1.3-1.fc22.noarch I no longer get error while trying access children and caseplans attributes.
Comment 9 Fedora Update System 2016-02-10 12:20:03 EST
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 10 Fedora Update System 2016-02-10 13:22:38 EST
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 11 Fedora Update System 2016-02-10 13:50:40 EST
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 12 Fedora Update System 2016-02-10 18:54:10 EST
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 13 Petr Šplíchal 2016-02-15 03:09:20 EST
(In reply to Leos Pol from comment #8)
> With python-nitrate-1.3-1.fc22.noarch I no longer get error
> while trying access children and caseplans attributes.

Thanks for the verification, Leoš.
Comment 14 Fedora Update System 2016-02-20 21:22:03 EST
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 15 Fedora Update System 2016-02-21 11:27:18 EST
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 16 Fedora Update System 2016-02-26 21:01:04 EST
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 17 Fedora Update System 2016-02-26 21:07:52 EST
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.