You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.5 KiB

From 20f5864e8f41957f6ed4b94a0199253a821b8c40 Mon Sep 17 00:00:00 2001
From: Alberto Fanjul Alonso <albertofanjul@gmail.com>
Date: Tue, 28 Apr 2015 15:44:23 +0200
Subject: [PATCH] sysv-generator test: Fix assertion
(cherry picked from commit 230f04856647fcfb07d5658f4b8c1cb3557fa0d8)
Cherry-picked from: 230f048
Resolves: #1222517
---
test/sysv-generator-test.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/sysv-generator-test.py b/test/sysv-generator-test.py
index 09f5c01762..509899e0a5 100644
--- a/test/sysv-generator-test.py
+++ b/test/sysv-generator-test.py
@@ -323,7 +323,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')
@@ -361,7 +361,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', [2, 3, 4, 5])
self.assert_enabled('foo.bak.service', [])