def test_ignore_users(self, m_run): m_run.return_value = EXAMPLE_CORRECT_RETURN_VALUE users = api_user.get_users_on_host('vinz-ubuntu.student.iastate.edu') self.assertFalse('games' in users) self.assertFalse('daemon' in users) self.assertFalse('www-data' in users)
def get_users(): from scanner.api import user print user.get_users_on_host('vinz-debian-7.student.iastate.edu') print user.get_users_on_host('vinz-fedora.student.iastate.edu') print user.get_users_on_host('vinz-opensuse.student.iastate.edu') print user.get_users_on_host('vinz-centos.student.iastate.edu')
def test_get_users(self, m_run): m_run.return_value = EXAMPLE_CORRECT_RETURN_VALUE users = api_user.get_users_on_host('vinz-ubuntu.student.iastate.edu') self.assertTrue('vinz' in users)