Closed norrs closed 10 years ago
os.path.exists
on line 44 in config.py was breaking test_get_docker_config_is_type_defaultdict
. NameTemporaryFile
is portable across python 2/3 and fixes the test case. I suppose we could mock os.path.exists to complete this test without using a real file?
Yup, I'll see if I have any spare time after work to fix this tiny TODO.
I took a swing at this in @58d3665ee16bcf52f5db57a098ddbe8fcd880da0. If it looks good to you I'll merge to master.
Go a head :-)
You want to revert https://github.com/shawnsi/docker-rpmbuild/commit/631c073a2aafa642dd9e2be72e27e34e3d2f1d6f, you don't want to involve real files in a unit test (NamedTemporaryFile) . Make integration tests incase you want that. (that's why we only assert that the mock is called once with the same argument given in --config.