Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Commit

Permalink
Last bits for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacBlanco committed Jun 23, 2016
1 parent 0eea835 commit 51ab552
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/test_service_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,16 @@ def test_ambari_check_good(self, mock, mock2):

@mock.patch('scripts.curl_client.CurlClient.make_request', side_effect=[['200 OK', ''], ['200 OK', '']])
@mock.patch('__builtin__.raw_input', side_effect=['\n', '\n', 'v', 'n'])
def test_ambari_check_good(self, mock, mock2):
def test_ambari_check_false(self, mock, mock2):
conf = scripts.config.read_config('../conf/global-config.conf')['AMBARI']
assert service_installer.check_ambari_service_installed('ZEPPELIN', conf) == True


@mock.patch('scripts.curl_client.CurlClient.make_request', side_effect=[['', ''],['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', '']])
@mock.patch('__builtin__.raw_input', side_effect=['', '', '', '', '', '', '', '', '', '', ''])
def test_ambari_check_many_attempts(self, mock, mock2):
conf = scripts.config.read_config('../conf/global-config.conf')['AMBARI']
assert service_installer.check_ambari_service_installed('ZEPPELIN', conf) == False



Expand Down

0 comments on commit 51ab552

Please sign in to comment.