Opened 7 years ago

Closed 7 years ago

#9380 closed (wontfix)

incomplete documention on create_test_db in combination with sqlite

Reported by: rvanlaar Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


create_test_db uses a memory database fopr sqlite. This is not shown in the documentation:
create_test_db() has the side effect of modifying settings.DATABASE_NAME to match the name of the test database

create_test_db() doesn't change the DATABASE_NAME when using the in memory db

Change History (1)

comment:1 Changed 7 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks, but none of these changes are necessary.

create_test_db() does modify settings.DATABASE_NAME even for SQLite. Also, the SQLite database is only created in-memory if you don't specify TEST_DATABASE_NAME.

It's documented earlier in the testing documentation how the test database name is created and it's not just a simple description (it's either derived from DATABASE_NAME or in-memory or from TEST_DATABASE_NAME). Repeating all that in the documentation for create_test_db() doesn't seem to add any extra information about how to use the function. It's not even information you need to know to use the function. The current documentation is correct in saying that this function creates the test database, whatever the name may be (including ":memory:").

Note: See TracTickets for help on using tickets.
Back to Top