As a sys admin I am trying to simulate a user on a virtual machine for testing log file monitoring.   
The simulated user will be automated to perform various tasks that should show up in bash history, "ls", "cd", "touch" etc. It is important that they show up in bash history because the bash history is logged. 
I have thought about writing directly to the bash history but would prefer to more accurately simulate a users behavior. The reason being that the bash history is not the only log file being watched and it would be better if logs for the same event remained synchronized.   
Details
I am working on CentOS Linux release 7.3.1611
Python 2.7.5 is installed 
I have already tried to use pexpect.run('ls') or pexpect.spawn('ls'), 'ls' does not show up in the bash history with either command.
The short answer appears to be no you cannot do this with pexpect. 
Auditd is a possible alternative for tracking user input, but I have not figured out how to get it to record commands such as 'ls' and 'cd' because they do not call the system execve() command. The best work around I have found is to use the script command which opens another interactive terminal where every command entered in the prompt is recorded. You can use the file the script command outputs to (by default is typescript) to log all user commands.
Is it possible to use pexpect to generate bash shell commands that will show up in bash history?