i have created the database without checking Load demonstration data
.
Now my code is failing to obtain demo_user on my tests :: As expected
user_demo = self.env.ref('base.user_demo')
ValueError: External ID not found in the system: base.user_demo
Now how can i load demonstration data
Well the answer is in your question, demonstration data is loaded only when a database is created with that "Load demonstration data" option.