Пример #1
0
 def test_setup_dusty_config_pass_arguments_3(
     self, fake_get_vm_size, fake_get_mac, fake_get_default_specs, fake_pwnam
 ):
     setup_dusty_config(specs_repo="1")
     fake_get_vm_size.assert_has_calls([call()])
     fake_get_mac.assert_has_calls([call()])
     fake_get_default_specs.assert_has_calls([])
Пример #2
0
 def test_setup_dusty_config_pass_arguments_1(self, fake_get_mac, fake_get_default_specs, fake_get_nginx, fake_pwnam):
     setup_dusty_config(mac_username='******',
                        specs_repo='2',
                        nginx_includes_dir='3')
     fake_get_mac.assert_has_calls([])
     fake_get_default_specs.assert_has_calls([])
     fake_get_nginx.assert_has_calls([])
Пример #3
0
 def test_setup_dusty_config_pass_arguments_3(self, fake_get_vm_size,
                                              fake_get_mac,
                                              fake_get_default_specs,
                                              fake_pwnam):
     setup_dusty_config(specs_repo='1')
     fake_get_vm_size.assert_has_calls([call()])
     fake_get_mac.assert_has_calls([call()])
     fake_get_default_specs.assert_has_calls([])
Пример #4
0
 def test_setup_dusty_config(self, fake_get_mac, fake_get_default_specs, fake_get_nginx, fake_pwnam):
     fake_get_mac.return_value = 'user'
     fake_get_default_specs.return_value = 'github.com/gamechanger/dusty'
     fake_get_nginx.return_value = '/etc/dusty/nginx'
     expected_dict_argument = {constants.CONFIG_MAC_USERNAME_KEY: 'user',
                               constants.CONFIG_SPECS_REPO_KEY: 'github.com/gamechanger/dusty',
                               constants.CONFIG_NGINX_DIR_KEY: '/etc/dusty/nginx'}
     return_payload = setup_dusty_config()
     self.assertEqual(return_payload.fn, complete_setup)
     self.assertEqual(return_payload.args[0], expected_dict_argument)
Пример #5
0
 def test_setup_dusty_config(self, fake_get_vm_size, fake_get_mac, fake_get_default_specs, fake_pwnam):
     fake_get_mac.return_value = 'user'
     fake_get_default_specs.return_value = 'github.com/gamechanger/dusty'
     fake_get_vm_size.return_value = 6
     expected_dict_argument = {constants.CONFIG_MAC_USERNAME_KEY: 'user',
                               constants.CONFIG_SPECS_REPO_KEY: 'github.com/gamechanger/dusty',
                               constants.CONFIG_VM_MEM_SIZE: '6'}
     return_payload = setup_dusty_config()
     self.assertEqual(return_payload.fn, complete_setup)
     self.assertEqual(return_payload.args[0], expected_dict_argument)
Пример #6
0
 def test_setup_dusty_config(self, fake_get_vm_size, fake_get_mac,
                             fake_get_default_specs, fake_pwnam):
     fake_get_mac.return_value = 'user'
     fake_get_default_specs.return_value = 'github.com/gamechanger/dusty'
     fake_get_vm_size.return_value = 6
     expected_dict_argument = {
         constants.CONFIG_MAC_USERNAME_KEY: 'user',
         constants.CONFIG_SPECS_REPO_KEY: 'github.com/gamechanger/dusty',
         constants.CONFIG_VM_MEM_SIZE: '6'
     }
     return_payload = setup_dusty_config()
     self.assertEqual(return_payload.fn, complete_setup)
     self.assertEqual(return_payload.args[0], expected_dict_argument)
Пример #7
0
 def test_setup_dusty_config_pass_arguments_4(self, fake_get_mac, fake_get_default_specs, fake_get_nginx, fake_pwnam):
     setup_dusty_config(nginx_includes_dir='1')
     fake_get_mac.assert_has_calls([call()])
     fake_get_default_specs.assert_has_calls([call()])
     fake_get_nginx.assert_has_calls([])
Пример #8
0
 def test_setup_dusty_config_pass_arguments_2(self, fake_get_mac, fake_get_default_specs, fake_get_nginx, fake_pwnam):
     setup_dusty_config(mac_username='******')
     fake_get_mac.assert_has_calls([])
     fake_get_default_specs.assert_has_calls([call()])
     fake_get_nginx.assert_has_calls([call()])
Пример #9
0
 def test_setup_dusty_config_pass_arguments_1(self, fake_get_vm_size, fake_get_mac, fake_get_default_specs, fake_pwnam):
     setup_dusty_config(mac_username='******',
                        specs_repo='2')
     fake_get_vm_size.assert_has_calls([call()])
     fake_get_mac.assert_has_calls([])
     fake_get_default_specs.assert_has_calls([])
Пример #10
0
 def test_enter_is_accepted_as_yes(self, fake_get_raw_input):
     fake_get_raw_input.return_value = ''
     setup_dusty_config()
Пример #11
0
 def test_enter_is_accepted_as_yes(self, fake_get_raw_input):
     fake_get_raw_input.return_value = ''
     setup_dusty_config()