Beispiel #1
0
 def test_get_users(self):
     self.assertDictEqual(
         {
             'terminal': 'ttys000',
             'started': 0.0,
             'host': 'localhost',
             'name': 'bdobbs'
         },
         ps.get_users()[0])
Beispiel #2
0
 def test_get_users(self):
     with patch('salt.utils.psutil_compat.users',
                MagicMock(return_value=[STUB_USER])):
         self.assertDictEqual(
             {
                 'terminal': 'ttys000',
                 'started': 0.0,
                 'host': 'localhost',
                 'name': 'bdobbs'
             },
             ps.get_users()[0])
Beispiel #3
0
 def test_get_users(self):
     with patch("salt.utils.psutil_compat.users",
                MagicMock(return_value=[STUB_USER])):
         self.assertDictEqual(
             {
                 "terminal": "ttys000",
                 "started": 0.0,
                 "host": "localhost",
                 "name": "bdobbs",
             },
             ps.get_users()[0],
         )
Beispiel #4
0
 def test_get_users(self):
     self.assertDictEqual(
         {"terminal": "ttys000", "started": 0.0, "host": "localhost", "name": "bdobbs"}, ps.get_users()[0]
     )
Beispiel #5
0
 def test_get_users(self):
     self.assertDictEqual({'terminal': 'ttys000', 'started': 0.0, 'host': 'localhost', 'name': 'bdobbs'},
                          ps.get_users()[0])