@@ -259,7 +259,7 @@ def test_category_list(self, mock_get):
259259
260260 # assert
261261 mock_get .assert_called_with ("/rest/com/vmware/cis/tagging/category" )
262- self .assertEquals (result , expected )
262+ self .assertEqual (result , expected )
263263
264264 @mock .patch ("vmwarelib.tagging.VmwareTagging.get" )
265265 def test_category_get (self , mock_get ):
@@ -274,7 +274,7 @@ def test_category_get(self, mock_get):
274274
275275 # assert
276276 mock_get .assert_called_with ("/rest/com/vmware/cis/tagging/category/id:1234" )
277- self .assertEquals (result , expected )
277+ self .assertEqual (result , expected )
278278
279279 @mock .patch ("vmwarelib.tagging.VmwareTagging.delete" )
280280 def test_category_delete (self , mock_delete ):
@@ -289,7 +289,7 @@ def test_category_delete(self, mock_delete):
289289
290290 # assert
291291 mock_delete .assert_called_with ("/rest/com/vmware/cis/tagging/category/id:1234" )
292- self .assertEquals (result , expected )
292+ self .assertEqual (result , expected )
293293
294294 @mock .patch ("vmwarelib.tagging.VmwareTagging.category_get" )
295295 @mock .patch ("vmwarelib.tagging.VmwareTagging.category_list" )
@@ -307,7 +307,7 @@ def test_category_find_by_name(self, mock_category_list, mock_category_get):
307307 result = action .category_find_by_name ("b" )
308308
309309 # assert
310- self .assertEquals (result , {"name" : "b" , "value" : "xx" })
310+ self .assertEqual (result , {"name" : "b" , "value" : "xx" })
311311
312312 @mock .patch ("vmwarelib.tagging.VmwareTagging.category_get" )
313313 @mock .patch ("vmwarelib.tagging.VmwareTagging.category_list" )
@@ -325,15 +325,15 @@ def test_category_find_by_name_not_found(self, mock_category_list, mock_category
325325 result = action .category_find_by_name ("abc123" )
326326
327327 # assert
328- self .assertEquals (result , None )
328+ self .assertEqual (result , None )
329329
330330 def test_category_create_spec (self ):
331331 action = self .create_class_object ()
332332 create_spec = action .category_create_spec ()
333- self .assertEquals (create_spec , {"name" : "" ,
334- "description" : "" ,
335- "cardinality" : "SINGLE" ,
336- "associable_types" : []})
333+ self .assertEqual (create_spec , {"name" : "" ,
334+ "description" : "" ,
335+ "cardinality" : "SINGLE" ,
336+ "associable_types" : []})
337337
338338 @mock .patch ("vmwarelib.tagging.VmwareTagging.post" )
339339 def test_category_create_all_params (self , mock_post ):
@@ -360,7 +360,7 @@ def test_category_create_all_params(self, mock_post):
360360 # assert
361361 mock_post .assert_called_with ("/rest/com/vmware/cis/tagging/category" ,
362362 payload = {"create_spec" : expected_create_spec })
363- self .assertEquals (result , "expected result" )
363+ self .assertEqual (result , "expected result" )
364364
365365 @mock .patch ("vmwarelib.tagging.VmwareTagging.post" )
366366 def test_category_create_no_params (self , mock_post ):
@@ -382,7 +382,7 @@ def test_category_create_no_params(self, mock_post):
382382 # assert
383383 mock_post .assert_called_with ("/rest/com/vmware/cis/tagging/category" ,
384384 payload = {"create_spec" : expected_create_spec })
385- self .assertEquals (result , "expected result" )
385+ self .assertEqual (result , "expected result" )
386386
387387 @mock .patch ("vmwarelib.tagging.VmwareTagging.category_find_by_name" )
388388 def test_category_get_or_create_get (self , mock_category_find_by_name ):
@@ -397,7 +397,7 @@ def test_category_get_or_create_get(self, mock_category_find_by_name):
397397
398398 # assert
399399 mock_category_find_by_name .assert_called_with ("name" )
400- self .assertEquals (result , "fake category" )
400+ self .assertEqual (result , "fake category" )
401401
402402 @mock .patch ("vmwarelib.tagging.VmwareTagging.category_get" )
403403 @mock .patch ("vmwarelib.tagging.VmwareTagging.category_create" )
@@ -426,7 +426,7 @@ def test_category_get_or_create_create_all_params(self, mock_category_find_by_na
426426 mock_category_create .assert_called_with (test_name , test_description , test_cardinality ,
427427 test_associable_types )
428428 mock_category_get .assert_called_with ("123" )
429- self .assertEquals (result , "fake category" )
429+ self .assertEqual (result , "fake category" )
430430
431431 @mock .patch ("vmwarelib.tagging.VmwareTagging.category_get" )
432432 @mock .patch ("vmwarelib.tagging.VmwareTagging.category_create" )
@@ -450,7 +450,7 @@ def test_category_get_or_create_create_no_params(self, mock_category_find_by_nam
450450 mock_category_find_by_name .assert_called_with (test_name )
451451 mock_category_create .assert_called_with (test_name , None , None , None )
452452 mock_category_get .assert_called_with ("123" )
453- self .assertEquals (result , "fake category" )
453+ self .assertEqual (result , "fake category" )
454454
455455 ############################################################################
456456
@@ -470,7 +470,7 @@ def test_tag_list_category(self, mock_post):
470470 # assert
471471 mock_post .assert_called_with ("/rest/com/vmware/cis/tagging/tag/id:1234" ,
472472 params = {"~action" : "list-tags-for-category" })
473- self .assertEquals (result , expected )
473+ self .assertEqual (result , expected )
474474
475475 @mock .patch ("vmwarelib.tagging.VmwareTagging.get" )
476476 def test_tag_list_no_category (self , mock_get ):
@@ -484,7 +484,7 @@ def test_tag_list_no_category(self, mock_get):
484484
485485 # assert
486486 mock_get .assert_called_with ("/rest/com/vmware/cis/tagging/tag" )
487- self .assertEquals (result , expected )
487+ self .assertEqual (result , expected )
488488
489489 @mock .patch ("vmwarelib.tagging.VmwareTagging.get" )
490490 def test_tag_get (self , mock_get ):
@@ -499,7 +499,7 @@ def test_tag_get(self, mock_get):
499499
500500 # assert
501501 mock_get .assert_called_with ("/rest/com/vmware/cis/tagging/tag/id:1234" )
502- self .assertEquals (result , expected )
502+ self .assertEqual (result , expected )
503503
504504 @mock .patch ("vmwarelib.tagging.VmwareTagging.delete" )
505505 def test_tag_delete (self , mock_delete ):
@@ -514,7 +514,7 @@ def test_tag_delete(self, mock_delete):
514514
515515 # assert
516516 mock_delete .assert_called_with ("/rest/com/vmware/cis/tagging/tag/id:1234" )
517- self .assertEquals (result , expected )
517+ self .assertEqual (result , expected )
518518
519519 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_get" )
520520 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_list" )
@@ -535,7 +535,7 @@ def test_tag_find_by_name(self, mock_tag_list, mock_tag_get):
535535
536536 # assert
537537 mock_tag_list .assert_called_with (test_category_id )
538- self .assertEquals (result , {"name" : "b" , "value" : "xx" })
538+ self .assertEqual (result , {"name" : "b" , "value" : "xx" })
539539
540540 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_get" )
541541 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_list" )
@@ -557,14 +557,14 @@ def test_tag_find_not_found(self, mock_tag_list, mock_tag_get):
557557 mock_tag_list .assert_called_with (None )
558558 mock_tag_get .assert_has_calls ([mock .call ("1" ), mock .call ("2" ), mock .call ("3" )],
559559 any_order = True )
560- self .assertEquals (result , None )
560+ self .assertEqual (result , None )
561561
562562 def test_tag_create_spec (self ):
563563 action = self .create_class_object ()
564564 create_spec = action .tag_create_spec ()
565- self .assertEquals (create_spec , {"name" : "" ,
566- "description" : "" ,
567- "category_id" : "" })
565+ self .assertEqual (create_spec , {"name" : "" ,
566+ "description" : "" ,
567+ "category_id" : "" })
568568
569569 @mock .patch ("vmwarelib.tagging.VmwareTagging.post" )
570570 def test_tag_create (self , mock_post ):
@@ -585,7 +585,7 @@ def test_tag_create(self, mock_post):
585585 # assert
586586 mock_post .assert_called_with ("/rest/com/vmware/cis/tagging/tag" ,
587587 payload = {"create_spec" : expected_create_spec })
588- self .assertEquals (result , "expected result" )
588+ self .assertEqual (result , "expected result" )
589589
590590 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_find_by_name" )
591591 def test_tag_get_or_create_get (self , mock_tag_find_by_name ):
@@ -602,7 +602,7 @@ def test_tag_get_or_create_get(self, mock_tag_find_by_name):
602602
603603 # assert
604604 mock_tag_find_by_name .assert_called_with (test_tag_name , test_category_id )
605- self .assertEquals (result , "fake tag" )
605+ self .assertEqual (result , "fake tag" )
606606
607607 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_get" )
608608 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_create" )
@@ -623,7 +623,7 @@ def test_tag_get_or_create_create(self, mock_tag_find_by_name,
623623 mock_tag_find_by_name .assert_called_with (test_tag_name , test_category_id )
624624 mock_tag_create .assert_called_with (test_tag_name , test_category_id , None )
625625 mock_tag_get .assert_called_with ("123" )
626- self .assertEquals (result , "fake tag" )
626+ self .assertEqual (result , "fake tag" )
627627
628628 ############################################################################
629629
@@ -632,14 +632,14 @@ def test_tag_get_or_create_create(self, mock_tag_find_by_name,
632632 def test_tag_association_endpoint (self ):
633633 action = self .create_class_object ()
634634 result = action .tag_association_endpoint ()
635- self .assertEquals (result ,
636- "/rest/com/vmware/cis/tagging/tag-association" )
635+ self .assertEqual (result ,
636+ "/rest/com/vmware/cis/tagging/tag-association" )
637637
638638 def test_tag_association_endpoint_tag_id (self ):
639639 action = self .create_class_object ()
640640 result = action .tag_association_endpoint ("123" )
641- self .assertEquals (result ,
642- "/rest/com/vmware/cis/tagging/tag-association/id:123" )
641+ self .assertEqual (result ,
642+ "/rest/com/vmware/cis/tagging/tag-association/id:123" )
643643
644644 @mock .patch ("vmwarelib.tagging.VmwareTagging.post" )
645645 def test_tag_association_attach (self , mock_post ):
@@ -651,7 +651,7 @@ def test_tag_association_attach(self, mock_post):
651651 params = {'~action' : "attach" },
652652 payload = {"object_id" : {"id" : "vm-789" ,
653653 "type" : "vm" }})
654- self .assertEquals (result , "response" )
654+ self .assertEqual (result , "response" )
655655
656656 @mock .patch ("vmwarelib.tagging.VmwareTagging.post" )
657657 def test_tag_association_attach_multiple (self , mock_post ):
@@ -665,7 +665,7 @@ def test_tag_association_attach_multiple(self, mock_post):
665665 payload = {"tag_ids" : test_tag_ids ,
666666 "object_id" : {"id" : "vm-789" ,
667667 "type" : "vm" }})
668- self .assertEquals (result , "response" )
668+ self .assertEqual (result , "response" )
669669
670670 @mock .patch ("vmwarelib.tagging.VmwareTagging.post" )
671671 def test_tag_association_detach (self , mock_post ):
@@ -677,7 +677,7 @@ def test_tag_association_detach(self, mock_post):
677677 params = {'~action' : 'detach' },
678678 payload = {"object_id" : {"id" : "vm-789" ,
679679 "type" : "vm" }})
680- self .assertEquals (result , "response" )
680+ self .assertEqual (result , "response" )
681681
682682 @mock .patch ("vmwarelib.tagging.VmwareTagging.post" )
683683 def test_tag_association_list_attached_tags (self , mock_post ):
@@ -689,7 +689,7 @@ def test_tag_association_list_attached_tags(self, mock_post):
689689 params = {'~action' : 'list-attached-tags' },
690690 payload = {"object_id" : {"id" : "vm-789" ,
691691 "type" : "vm" }})
692- self .assertEquals (result , "response" )
692+ self .assertEqual (result , "response" )
693693
694694 @mock .patch ("vmwarelib.tagging.VmwareTagging.post" )
695695 def test_tag_association_list_attached_objects (self , mock_post ):
@@ -699,7 +699,7 @@ def test_tag_association_list_attached_objects(self, mock_post):
699699
700700 mock_post .assert_called_with ("/rest/com/vmware/cis/tagging/tag-association/id:123" ,
701701 params = {'~action' : 'list-attached-objects' })
702- self .assertEquals (result , "response" )
702+ self .assertEqual (result , "response" )
703703
704704 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_association_detach" )
705705 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_get" )
@@ -714,7 +714,7 @@ def test_tag_association_detach_category(self, mock_tag_association_list_attache
714714 {"name" : "3" , "category_id" : "c2" }]
715715
716716 results = action .tag_association_detach_category ("c2" , "vm" , "vm-123" )
717- self .assertEquals (results , [{"name" : "3" , "category_id" : "c2" }])
717+ self .assertEqual (results , [{"name" : "3" , "category_id" : "c2" }])
718718
719719 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_association_detach" )
720720 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_get" )
@@ -730,7 +730,7 @@ def test_tag_association_detach_category_no_match(self,
730730 {"name" : "3" , "category_id" : "c2" }]
731731
732732 results = action .tag_association_detach_category ("xyz" , "vm" , "vm-123" )
733- self .assertEquals (results , [])
733+ self .assertEqual (results , [])
734734
735735 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_association_attach" )
736736 @mock .patch ("vmwarelib.tagging.VmwareTagging.tag_association_detach_category" )
@@ -751,4 +751,4 @@ def test_tag_association_replace(self, mock_tag_get,
751751 mock_tag_association_attach .assert_called_with ("123" ,
752752 "vm" ,
753753 "vm-789" )
754- self .assertEquals (results , "expected" )
754+ self .assertEqual (results , "expected" )
0 commit comments