ceph / merfi

Finds and signs files with different signing tools (gpg, rpm-sign)
MIT License
3 stars 3 forks source link

tests fail with "AttributeError: 'Gpg' object has no attribute 'get_path'" #2

Closed ktdreyer closed 9 years ago

ktdreyer commented 9 years ago

I'm testing 86552f62de631eeddd529284afd9e1d3a5d5bd56 , and the test suite fails because the Gpg object has no get_path() method

Some commits not pushed yet, maybe?

$ py.test tests/
============================= test session starts ==============================
platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.3
rootdir: /home/kdreyer/dev/merfi, inifile: 
collected 3 items 

tests/backends/test_gpg.py FFF

=================================== FAILURES ===================================
_____________________ TestGpgGetPath.test_no_last_argument _____________________

self = <test_gpg.TestGpgGetPath object at 0x7f6f67f51fd0>

    def test_no_last_argument(self):
        args = ['gpg', '--output', 'signed']
>       result = self.gpg_.get_path(args)
E       AttributeError: 'Gpg' object has no attribute 'get_path'

tests/backends/test_gpg.py:11: AttributeError
______________________ TestGpgGetPath.test_last_argument _______________________

self = <test_gpg.TestGpgGetPath object at 0x7f6f67cf2390>

    def test_last_argument(self):
        args = ['gpg', '--output', 'signed', '/']
>       result = self.gpg_.get_path(args)
E       AttributeError: 'Gpg' object has no attribute 'get_path'

tests/backends/test_gpg.py:17: AttributeError
_______________________ TestGpgGetPath.test_no_arguments _______________________

self = <test_gpg.TestGpgGetPath object at 0x7f6f67cf2690>

    def test_no_arguments(self):
        # the parser engine pops the current command so we can
        # certainly end up with an empty argv list
>       result = self.gpg_.get_path([])
E       AttributeError: 'Gpg' object has no attribute 'get_path'

tests/backends/test_gpg.py:23: AttributeError
=========================== 3 failed in 0.02 seconds ===========================
alfredodeza commented 9 years ago

I am pretty sure it was a change I wanted/needed before using the tool to do some actual work and forgot to update the tests. Will look at this and fix it right away

alfredodeza commented 9 years ago

mostly fixed with 08e2634df3967791eefc6dbf125ec4f039b6df19

ktdreyer commented 9 years ago

Looks good here! thank you!

$ py.test merfi/tests/
============================= test session starts ==============================
platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.3
rootdir: /home/kdreyer/dev/merfi, inifile: 
collected 3 items 

merfi/tests/test_util.py ...

=========================== 3 passed in 0.03 seconds ===========================