Petr Horáček has posted comments on this change.
Change subject: net: test_setupNetworks_bond_with_custom_option with ifcfg persistence ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/43467/1/tests/functional/networkTests.py File tests/functional/networkTests.py:
Line 2474: self.assertEquals(opts, 'mode=balance-rr') Line 2475: else: # ifcfg persistence Line 2476: with open(NET_CONF_PREF + BONDING_NAME) as f: Line 2477: for l in f: Line 2478: if l.startswith('BONDING_OPTS='):
why don't you use a simple equality?
Because of there could be (the is) a new line char and we would have to test both cases, with and without \n. But it is probably ok to compare it with just the usual line. Line 2479: self.assertIn('mode=balance-rr', l) Line 2480: self.assertNotIn('custom=foo', l) Line 2481: Line 2482: status, msg = self.setupNetworks(