Ejemplo n.º 1
0
 def test_lpass_field_field1(self, mock_check_output):
     mock_check_output.return_value = "fakefield1\n".encode("utf-8")
     out = lpass.lpass_field('my_name', 'field1')
     mock_check_output.\
         assert_called_with(['lpass', 'show', '--field=field1', 'my_name'])
     assert out == "fakefield1"
Ejemplo n.º 2
0
 def test_lpass_field_notes(self, mock_check_output):
     mock_check_output.return_value = "fakenotes\n".encode("utf-8")
     out = lpass.lpass_field('my_name', 'notes')
     mock_check_output.\
         assert_called_with(['lpass', 'show', '--notes', 'my_name'])
     assert out == "fakenotes"
Ejemplo n.º 3
0
 def test_lpass_field_password(self, mock_check_output):
     mock_check_output.return_value = "fakepassword\n".encode("utf-8")
     out = lpass.lpass_field('my_name', 'password')
     mock_check_output.\
         assert_called_with(['lpass', 'show', '--password', 'my_name'])
     assert out == "fakepassword"