Code

Opened 7 years ago

Closed 7 years ago

#6068 closed (fixed)

typo error in modeltests docstring

Reported by: bartuer <bartuer@…> Owned by: bartuer
Component: Uncategorized Version: master
Severity: Keywords: tests fixtures user-registered management commands
Cc: bartuer@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

in tests/modeltests, fixture and user_commands are all signed with number 37, this is a typo error.

37.Fixtures. ./fixtures/models.py
37.User-registered management commands ./user_commands/models.py

And all docstring of models.py after number 37 should be changed, they are:
tests/modeltests/user_commands/models.py should be 38
tests/modeltests/test_client/models.py should be 39
tests/modeltests/empty/models.py should be 40
tests/modeltests/select_related/models.py should be 41
tests/modeltests/serializers/models.py should be 42

Attachments (3)

6068.diff (2.3 KB) - added by bartuer <bartuer@…> 7 years ago.
sprint-6068.diff (2.2 KB) - added by bartuer 7 years ago.
this is the right diff
6068.patch (2.2 KB) - added by Wang Chun <wangchun@…> 7 years ago.
no preview in trac, rename and try again…

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by bartuer <bartuer@…>

comment:1 Changed 7 years ago by bartuer <bartuer@…>

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to anonymous
  • Patch needs improvement unset
  • Status changed from new to assigned

after upload my patch, find the patch has nothing! so I paste it here:

Index: tests/modeltests/select_related/models.py
===================================================================
--- tests/modeltests/select_related/models.py (revision 6782)
+++ tests/modeltests/select_related/models.py (working copy)
@@ -1,5 +1,5 @@

"""

-40. Tests for select_related()
+41. Tests for select_related()

select_related() follows all relationships and pre-caches any foreign key
values so that complex trees can be fetched in a single query. However, this

Index: tests/modeltests/empty/models.py
===================================================================
--- tests/modeltests/empty/models.py (revision 6782)
+++ tests/modeltests/empty/models.py (working copy)
@@ -1,5 +1,5 @@

"""

-39. Empty model tests
+40. Empty model tests

These test that things behave sensibly for the rare corner-case of a model with
no fields.

Index: tests/modeltests/serializers/models.py
===================================================================
--- tests/modeltests/serializers/models.py (revision 6782)
+++ tests/modeltests/serializers/models.py (working copy)
@@ -1,6 +1,6 @@

# -*- coding: utf-8 -*-
"""

-41. Serialization
+42. Serialization

django.core.serializers provides interfaces to converting Django querysets
to and from "flat" data (i.e. strings).

Index: tests/modeltests/user_commands/models.py
===================================================================
--- tests/modeltests/user_commands/models.py (revision 6782)
+++ tests/modeltests/user_commands/models.py (working copy)
@@ -1,5 +1,5 @@

"""

-37. User-registered management commands
+38. User-registered management commands

The manage.py utility provides a number of useful commands for managing a
Django project. If you want to add a utility command of your own, you can.

@@ -27,4 +27,4 @@

CommandError: Unknown command: 'explode'



-"""}
\ No newline at end of file
+"""}
Index: tests/modeltests/test_client/models.py
===================================================================
--- tests/modeltests/test_client/models.py (revision 6782)
+++ tests/modeltests/test_client/models.py (working copy)
@@ -1,6 +1,6 @@

# coding: utf-8
"""

-38. Testing using the Test Client
+39. Testing using the Test Client

The test client is a class that can act like a simple
browser for testing purposes.

comment:2 Changed 7 years ago by bartuer

  • Owner changed from anonymous to bartuer
  • Status changed from assigned to new

comment:3 Changed 7 years ago by bartuer

  • Status changed from new to assigned

comment:4 Changed 7 years ago by bartuer

  • Triage Stage changed from Unreviewed to Ready for checkin

Changed 7 years ago by bartuer

this is the right diff

Changed 7 years ago by Wang Chun <wangchun@…>

no preview in trac, rename and try again...

comment:5 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6813]) Fixed #6068 -- Updated docstrings in model tests to make the documentation
examples correct. Thanks Wang Chun.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.