How do I run a test in Django using production data (Read only)?
I agree with others that this is a bad idea for various reason. If you want to move forward with it anyway, set up a separate database user with read-only permissions. How you do this depends on the database server you are using.
Double check that you are actually using the credentials of the read-only user in your tests.
I would like to run a test in Django but in order to run the test I need access to data from the production database (I don't want to setup an entirely new database for testing).
How can use this data from the production database without allowing write access in my script? I don't want this test to effect anything, but I need access to this data in order to run this test. It seems ridiculous to have to launch (and pay for) an entirely new database just to grab a few rows of data, any advice?