Creating and testing that a database field has been created or not in same program
I got the solution, Actually problem was the transaction handling. Through out the program django uses auto_commit transaction so database change was happening only after program executed completely. So instead of auto_commit I am handling transaction manually by using transaction.commit_manually and transaction.commit() and transaction.rollback() to properly commit and rollback transactions at the point where I want them to save.
While writing a selenium test case,I have found out a weird situation
I was saving a form , and at the time of saving the form, I created a user into the database.
Now what is happening that user has been created successfully in the database but at the time of getting it in that same selenium test case I am getting DOESNOTEXIST exception. when I check manaually in the database, the newly created user is there.
Can anybody explain how can I create and test that user has been created or not on DB in same program ? and if it is not possible than Why ?