Пример #1
0
 def test_determineUser_if_not_runtime_uses_config(self):
     from niprov.users import Users
     users = Users(self.dependencies)
     self.config.user = '******'
     self.assertEqual(users.determineUser(None), 'jasmine')
Пример #2
0
 def test_determineUser_if_runtime_given_uses_that(self):
     from niprov.users import Users
     users = Users(self.dependencies)
     self.config.user = '******'
     self.assertEqual(users.determineUser('oddyseus'), 'oddyseus')
Пример #3
0
 def test_determineUser_if_not_config_or_runtime_uses_OS(self):
     from niprov.users import Users
     users = Users(self.dependencies)
     import getpass
     self.assertEqual(users.determineUser(None), getpass.getuser())