Changeset 3713
- Timestamp:
- 09/04/06 08:05:51 (2 years ago)
- Files:
-
- django/trunk/docs/testing.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/testing.txt
r3711 r3713 210 210 can be invoked on the ``Client`` instance. 211 211 212 ``get(path, data={}) :``212 ``get(path, data={})`` 213 213 214 214 Make a GET request on the provided ``path``. The key-value pairs in the … … 222 222 http://yoursite.com/customers/details/?name='fred'&age=7 223 223 224 ``post(path, data={}) :``224 ``post(path, data={})`` 225 225 226 226 Make a POST request on the provided ``path``. The key-value pairs in the 227 227 data dictionary will be used to create the POST data payload. This payload 228 will be transmitted with the mimetype `` `multipart/form-data``.228 will be transmitted with the mimetype ``multipart/form-data``. 229 229 230 230 However submitting files is a special case. To POST a file, you need only … … 243 243 need to manually close the file after it has been provided to the POST. 244 244 245 ``login(path, username, password) :``245 ``login(path, username, password)`` 246 246 247 247 In a production site, it is likely that some views will be protected with … … 427 427 428 428 ``setup_test_environment()`` 429 430 429 Performs any global pre-test setup, such as the installing the 431 430 instrumentation of the template rendering system. … … 436 435 of the template rendering system. 437 436 438 ``create_test_db(verbosity=1, autoclobber=False)``: 439 437 ``create_test_db(verbosity=1, autoclobber=False)`` 440 438 Creates a new test database, and run ``syncdb`` against it. 441 439 … … 451 449 ``settings.DATABASE_NAME`` to match the name of the test database. 452 450 453 ``destroy_test_db(old_database_name, verbosity=1)``: 454 451 ``destroy_test_db(old_database_name, verbosity=1)`` 455 452 Destroys the database with the name ``settings.DATABASE_NAME`` matching, 456 453 and restores the value of ``settings.DATABASE_NAME`` to the provided name.
