<s> """<STR_LIT>""" <EOL> import unittest <EOL> from cloudcafe . bare_metal . drivers . models . responses import Driver , Drivers <EOL> class DriversModelTest ( unittest . TestCase ) : <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> cls . drivers_json_response = """<STR_LIT>""" <EOL> cls . drivers = Drivers . deserialize ( cls . drivers_json_response , '<STR_LIT>' ) <EOL> def test_list_drivers ( self ) : <EOL> self . assertEqual ( len ( self . drivers ) , <NUM_LIT:8> ) <EOL> def test_drivers_in_list ( self ) : <EOL> self . assertTrue ( <EOL> any ( [ driver for driver in self . drivers <EOL> if driver . name == '<STR_LIT>' ] ) ) <EOL> self . assertTrue ( <EOL> any ( [ driver for driver in self . drivers <EOL> if driver . name == '<STR_LIT>' ] ) ) <EOL> self . assertTrue ( <EOL> any ( [ driver for driver in self . drivers <EOL> if driver . name == '<STR_LIT>' ] ) ) <EOL> self . assertTrue ( <EOL> any ( [ driver for driver in self . drivers <EOL> if driver . name == '<STR_LIT>' ] ) ) <EOL> self . assertTrue ( <EOL> any ( [ driver for driver in self . drivers <EOL> if driver . name == '<STR_LIT>' ] ) ) <EOL> self . assertTrue ( <EOL> any ( [ driver for driver in self . drivers <EOL> if driver . name == '<STR_LIT>' ] ) ) <EOL> self . assertTrue ( <EOL> any ( [ driver for driver in self . drivers <EOL> if driver . name == '<STR_LIT>' ] ) ) <EOL> self . assertTrue ( <EOL> any ( [ driver for driver in self . drivers <EOL> if driver . name == '<STR_LIT>' ] ) ) <EOL> class DriverModelTest ( unittest . TestCase ) : <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> cls . driver_json_response = """<STR_LIT>""" <EOL> cls . driver = Driver . deserialize ( cls . driver_json_response , '<STR_LIT>' ) <EOL> def test_driver_name ( self ) : <EOL> self . assertEqual ( self . driver . name , "<STR_LIT>" ) <EOL> def test_driver_hosts ( self ) : <EOL> self . assertEqual ( len ( self . driver . hosts ) , <NUM_LIT:1> ) <EOL> self . assertIn ( '<STR_LIT:localhost>' , self . driver . hosts ) <EOL> def test_driver_links ( self ) : <EOL> self . assertEqual ( len ( self . driver . links ) , <NUM_LIT:2> ) <EOL> for driver in self . driver . links : <EOL> self . assertIn ( driver . rel , [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> if driver . rel == '<STR_LIT>' : <EOL> self . assertEqual ( <EOL> driver . href , <EOL> '<STR_LIT>' ) <EOL> else : <EOL> self . assertEqual ( <EOL> driver . href , <EOL> '<STR_LIT>' ) </s>
