sysv-generator test: Fix assertion
authorAlberto Fanjul Alonso <albertofanjul@gmail.com>
Tue, 28 Apr 2015 13:44:23 +0000 (15:44 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 28 Apr 2015 13:44:23 +0000 (15:44 +0200)
test/sysv-generator-test.py

index cf7d467..e74f853 100644 (file)
@@ -330,7 +330,7 @@ class SysvGeneratorTest(unittest.TestCase):
         self.add_sysv('foo.sh', {'Provides': 'foo bar'})
         err, results = self.run_generator()
         # ensure we don't try to create a symlink to itself
-        self.assertNotIn(err, 'itself')
+        self.assertNotIn('itself', err)
         self.assertEqual(list(results), ['foo.service'])
         self.assertEqual(results['foo.service'].get('Unit', 'Description'),
                          'LSB: test foo service')
@@ -368,7 +368,7 @@ class SysvGeneratorTest(unittest.TestCase):
                          ['foo.bak.service', 'foo.old.service', 'foo.service'])
 
         # ensure we don't try to create a symlink to itself
-        self.assertNotIn(err, 'itself')
+        self.assertNotIn('itself', err)
 
         self.assert_enabled('foo.service', ['multi-user', 'graphical'])
         self.assert_enabled('foo.bak.service', [])