[Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins
Oleg Fayans
ofayans at redhat.com
Mon Jul 20 12:07:31 UTC 2015
Hi Martin,
Updated.
On 07/20/2015 12:46 PM, Martin Basti wrote:
> On 20/07/15 11:57, Oleg Fayans wrote:
>> + pwfile = api.env.dot_ipa + os.sep + ".dmpw"
>> + if ipautil.file_exists(pwfile):
>> + fp = open(pwfile, "r")
>> + dm_password = fp.read().rstrip()
>> + fp.close()
>> + else:
> Hello,
>
> 1) Can you use os.path.join() instead of "+ os.sep +" please
>
> 2) Can you use with statement with file?
>
> with open(pwfile, "r") as f:
> dm_password = f.read().rstrip()
>
> 3) Please keep PEP8 in new code
>
> ./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 line too
> long (102 > 79 characters)
> ./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 line too
> long (92 > 79 characters)
> ./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 line too
> long (124 > 79 characters)
> ./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 line too
> long (92 > 79 characters)
> ./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128
> continuation line under-indented for visual indent
> ./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 line too
> long (89 > 79 characters)
> ./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128
> continuation line under-indented for visual indent
> ./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 line too
> long (89 > 79 characters)
> ./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 line too
> long (87 > 79 characters)
>
> 4) Missing nose import
> raise nose.SkipTest("No directory manager password in %s"
> % pwfile)
>
> 5) Can you use sets here instead of sorted lists?
> assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))
>
>
> Martin^2
>
--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-ofayans-0001.1-test-topology-plugin-is-listed-among-DS-plugin.patch
Type: text/x-patch
Size: 3571 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150720/f06b0c50/attachment.bin>
More information about the Freeipa-devel
mailing list