@@ -592,12 +592,58 @@ def test_project_show(self):
592592 identity_fakes .project_id ,
593593 )
594594
595- collist = ('description' , 'enabled' , 'id' , 'name' )
595+ collist = ('description' , 'enabled' , 'id' , 'name' , 'properties' )
596596 self .assertEqual (collist , columns )
597597 datalist = (
598598 identity_fakes .project_description ,
599599 True ,
600600 identity_fakes .project_id ,
601601 identity_fakes .project_name ,
602+ '' ,
602603 )
603604 self .assertEqual (datalist , data )
605+
606+
607+ class TestProjectUnset (TestProject ):
608+
609+ def setUp (self ):
610+ super (TestProjectUnset , self ).setUp ()
611+
612+ project_dict = {'fee' : 'fi' , 'fo' : 'fum' }
613+ project_dict .update (identity_fakes .PROJECT )
614+ self .projects_mock .get .return_value = fakes .FakeResource (
615+ None ,
616+ copy .deepcopy (project_dict ),
617+ loaded = True ,
618+ )
619+
620+ # Get the command object to test
621+ self .cmd = project .UnsetProject (self .app , None )
622+
623+ def test_project_unset_key (self ):
624+ arglist = [
625+ '--property' , 'fee' ,
626+ '--property' , 'fo' ,
627+ identity_fakes .project_name ,
628+ ]
629+ verifylist = [
630+ ('property' , ['fee' , 'fo' ]),
631+ ]
632+
633+ parsed_args = self .check_parser (self .cmd , arglist , verifylist )
634+
635+ self .cmd .run (parsed_args )
636+ # Set expected values
637+ kwargs = {
638+ 'description' : identity_fakes .project_description ,
639+ 'enabled' : True ,
640+ 'fee' : None ,
641+ 'fo' : None ,
642+ 'id' : identity_fakes .project_id ,
643+ 'name' : identity_fakes .project_name ,
644+ }
645+
646+ self .projects_mock .update .assert_called_with (
647+ identity_fakes .project_id ,
648+ ** kwargs
649+ )
0 commit comments