<s> from __future__ import print_function <EOL> import unittest <EOL> import healthchecks <EOL> json_example = """<STR_LIT>""" <EOL> class TestHealthChecks ( unittest . TestCase ) : <EOL> def test_get_hosts_from_json ( self ) : <EOL> actual = healthchecks . get_hosts_from_json ( json_example ) <EOL> expected = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> self . assertEqual ( expected , actual ) <EOL> def test_get_hosts_from_dynamic_inventory ( self ) : <EOL> cmd = [ "<STR_LIT>" , json_example ] <EOL> actual = healthchecks . get_hosts_from_dynamic_inventory ( cmd ) <EOL> expected = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> self . assertEqual ( expected , actual ) <EOL> cmd = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> actual = healthchecks . get_hosts_from_dynamic_inventory ( cmd ) <EOL> def test_node_health_check ( self ) : <EOL> self . assertFalse ( healthchecks . node_health_check ( "<STR_LIT>" ) ) <EOL> def test_cluster_health_check ( self ) : <EOL> ips = [ "<STR_LIT>" ] <EOL> self . assertEqual ( <NUM_LIT:1> , healthchecks . cluster_health_check ( ips ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
