Code review comment for lp:~elopio/ubuntu-ui-toolkit/fake_app_fixture

Revision history for this message
Javier Collado (javier.collado) wrote :

I've looked into the code and run it in a desktop and works fine.

My only comment, is that I don't like the "assert_desktop_file_contents"
method. Instead of generating a long regular expression for the desktop file
and check that there's a match for every key value pair in the expected
contents dictionary, I'd parse the desktop file as a dictionary and run an
assertion on both the dictionaries:

        contents_dict = dict(
            [line.split('=')
             for line in desktop_file_contents.splitlines()[1:]])

        self.assertDictEqual(expected_contents_dict, contents_dict)

« Back to merge proposal