@@ -98,14 +98,20 @@ def test_delete_any_should_fail(self, credstore, offline):
9898 def test_generate_tag (self , mock_file , credstore , offline ):
9999 credstore .keygen .return_value = True
100100 main (['fakedev' , 'generate' , '123' , 'foo.der' ], credstore )
101- credstore .keygen .assert_called_with (123 , ANY )
101+ credstore .keygen .assert_called_with (123 , ANY , ANY )
102102
103103 @patch ('builtins.open' )
104104 def test_generate_file (self , mock_file , credstore , offline ):
105105 credstore .keygen .return_value = True
106106 main (['fakedev' , 'generate' , '123' , 'foo.der' ], credstore )
107107 mock_file .assert_called_with ('foo.der' , 'wb' , ANY , ANY , ANY )
108108
109+ @patch ('builtins.open' )
110+ def test_generate_with_attributes (self , credstore , offline ):
111+ credstore .keygen .return_value = True
112+ main (['fakedev' , 'generate' , '123' , 'foo.der' , '--attributes' , 'CN=foo' ], credstore )
113+ credstore .keygen .assert_called_with (123 , ANY , 'CN=foo' )
114+
109115 def test_no_at_client_exit_code (self , credstore , at_client ):
110116 at_client .verify .side_effect = NoATClientException ()
111117 with pytest .raises (SystemExit ) as e :
0 commit comments