@@ -71,8 +71,11 @@ def setUp(self):
7171 self .init_context = ProjectContext (command_options , 'init' )
7272
7373 def test_command_options (self ):
74- command_options_keys = ['project_type' , 'comment_cols' , 'user_config' , 'project_config' ]
75- self .assertEqual (self .context .command_options .keys (), command_options_keys )
74+ command_options_keys = ['project_type' , 'project_config' , 'comment_cols' , 'user_config' ]
75+ self .assertTrue (list (self .context .command_options .keys ())[0 ] in command_options_keys )
76+ self .assertTrue (list (self .context .command_options .keys ())[1 ] in command_options_keys )
77+ self .assertTrue (list (self .context .command_options .keys ())[2 ] in command_options_keys )
78+ self .assertTrue (list (self .context .command_options .keys ())[3 ] in command_options_keys )
7679 self .assertEqual (
7780 self .context .command_dict ,
7881 {'project_config' : './testfiles/zanata.xml' , 'comment_cols' : 'en-US,es,pos,description' ,
@@ -94,8 +97,8 @@ def test_build_local_config(self):
9497 self .context .local_config ['http_headers' ],
9598 {'Accept' : 'application/json' , 'X-Auth-User' : 'username' , 'X-Auth-Token' : 'key' }
9699 )
97- self .assertIn ('client_version' , self .context .local_config ,
98- 'local_config should contain client_version' )
100+ self .assertTrue ('client_version' in self .context .local_config ,
101+ 'local_config should contain client_version' )
99102
100103 @mock .patch ('zanataclient.zanatalib.projectservice.LocaleService.get_locales' )
101104 @mock .patch ('zanataclient.zanatalib.versionservice.VersionService.get_server_version' )
@@ -163,8 +166,8 @@ def test_process_locales(self):
163166
164167 def test_init_context (self ):
165168 context_data = self .init_context .get_context_data ()
166- self .assertIn ('servers' , context_data )
167- self .assertIn ('http://localhost:8080/zanata' , context_data ['servers' ])
169+ self .assertTrue ('servers' in context_data )
170+ self .assertTrue ('http://localhost:8080/zanata' in context_data ['servers' ])
168171
169172if __name__ == '__main__' :
170173 unittest .main ()
0 commit comments