File re-adding-function-to-test-for-root.patch of Package salt

From a6792f951f8090d8326de049eb48bb4a11291e06 Mon Sep 17 00:00:00 2001
From: Jochen Breuer <jbreuer@suse.de>
Date: Fri, 20 Mar 2020 13:58:54 +0100
Subject: [PATCH] Re-adding function to test for root

---
 tests/unit/modules/test_rpm_lowpkg.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/unit/modules/test_rpm_lowpkg.py b/tests/unit/modules/test_rpm_lowpkg.py
index 54b81f6972..b6cbd9e5cb 100644
--- a/tests/unit/modules/test_rpm_lowpkg.py
+++ b/tests/unit/modules/test_rpm_lowpkg.py
@@ -18,6 +18,11 @@ from tests.support.mock import (
 import salt.modules.rpm_lowpkg as rpm
 
 
+def _called_with_root(mock):
+    cmd = ' '.join(mock.call_args[0][0])
+    return cmd.startswith('rpm --root /')
+
+
 class RpmTestCase(TestCase, LoaderModuleMockMixin):
     '''
     Test cases for salt.modules.rpm
-- 
2.16.4


openSUSE Build Service is sponsored by