Skip to content

Commit 3892b34

Browse files
committed
Whitespace cleanup
1 parent d422695 commit 3892b34

3 files changed

Lines changed: 48 additions & 48 deletions

File tree

test_project/polls/fixtures/polls_testmaker.json

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
11
[
22
{
3-
"pk": 1,
4-
"model": "polls.poll",
3+
"pk": 1,
4+
"model": "polls.poll",
55
"fields": {
6-
"pub_date": "2007-04-01 00:00:00",
7-
"question": "What's up?",
6+
"pub_date": "2007-04-01 00:00:00",
7+
"question": "What's up?",
88
"slug": "whats-up"
99
}
10-
},
10+
},
1111
{
12-
"pk": 2,
13-
"model": "polls.poll",
12+
"pk": 2,
13+
"model": "polls.poll",
1414
"fields": {
15-
"pub_date": "2009-04-25 21:46:44",
16-
"question": "Test poll",
15+
"pub_date": "2009-04-25 21:46:44",
16+
"question": "Test poll",
1717
"slug": "test-poll"
1818
}
19-
},
19+
},
2020
{
21-
"pk": 1,
22-
"model": "polls.choice",
21+
"pk": 1,
22+
"model": "polls.choice",
2323
"fields": {
24-
"votes": 3,
25-
"poll": 1,
24+
"votes": 3,
25+
"poll": 1,
2626
"choice": "Just hacking again"
2727
}
28-
},
28+
},
2929
{
30-
"pk": 2,
31-
"model": "polls.choice",
30+
"pk": 2,
31+
"model": "polls.choice",
3232
"fields": {
33-
"votes": 2,
34-
"poll": 1,
33+
"votes": 2,
34+
"poll": 1,
3535
"choice": "Playing with fire"
3636
}
37-
},
37+
},
3838
{
39-
"pk": 3,
40-
"model": "polls.choice",
39+
"pk": 3,
40+
"model": "polls.choice",
4141
"fields": {
42-
"votes": 0,
43-
"poll": 1,
42+
"votes": 0,
43+
"poll": 1,
4444
"choice": "Clapping my shoes together three times"
4545
}
46-
},
46+
},
4747
{
48-
"pk": 4,
49-
"model": "polls.choice",
48+
"pk": 4,
49+
"model": "polls.choice",
5050
"fields": {
51-
"votes": 0,
52-
"poll": 2,
51+
"votes": 0,
52+
"poll": 2,
5353
"choice": "Choice 1 "
5454
}
55-
},
55+
},
5656
{
57-
"pk": 5,
58-
"model": "polls.choice",
57+
"pk": 5,
58+
"model": "polls.choice",
5959
"fields": {
60-
"votes": 3,
61-
"poll": 2,
60+
"votes": 3,
61+
"poll": 2,
6262
"choice": "Choice too"
6363
}
64-
},
64+
},
6565
{
66-
"pk": 6,
67-
"model": "polls.choice",
66+
"pk": 6,
67+
"model": "polls.choice",
6868
"fields": {
69-
"votes": 0,
70-
"poll": 2,
69+
"votes": 0,
70+
"poll": 2,
7171
"choice": "New Choice"
7272
}
7373
}

test_utils/management/commands/makefixture.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,24 @@ def handle_reverse(self, **options):
8181
related_set_name, model_name))
8282
to_reverse.setdefault(model, []).append(related_set_name)
8383
return to_reverse
84-
84+
8585
def handle_models(self, models, **options):
8686
format = options.get('format','json')
8787
indent = options.get('indent',None)
8888
show_traceback = options.get('traceback', False)
8989
propagate = options.get('propagate', True)
9090
follow_reverse = self.handle_reverse(**options)
91-
91+
9292
# Check that the serialization format exists; this is a shortcut to
9393
# avoid collating all the objects and _then_ failing.
9494
if format not in serializers.get_public_serializer_formats():
9595
raise CommandError("Unknown serialization format: %s" % format)
96-
96+
9797
try:
9898
serializers.get_serializer(format)
9999
except KeyError:
100100
raise CommandError("Unknown serialization format: %s" % format)
101-
101+
102102
objects = []
103103
for model, slice in models:
104104
if isinstance(slice, basestring):
@@ -113,7 +113,7 @@ def handle_models(self, models, **options):
113113
objects.extend(items)
114114
else:
115115
raise CommandError("Wrong slice: %s" % slice)
116-
116+
117117
all = objects
118118
if propagate:
119119
collected = set([(x.__class__, x.pk) for x in all])
@@ -134,7 +134,7 @@ def handle_models(self, models, **options):
134134
if new and not (new.__class__, new.pk) in collected:
135135
collected.add((new.__class__, new.pk))
136136
related.append(new)
137-
# follow reverse relations as requested
137+
# follow reverse relations as requested
138138
for reverse_field in follow_reverse.get(x.__class__, []):
139139
mgr = getattr(x, reverse_field)
140140
for new in mgr.all():
@@ -143,7 +143,7 @@ def handle_models(self, models, **options):
143143
related.append(new)
144144
objects = related
145145
all.extend(objects)
146-
146+
147147
try:
148148
return serializers.serialize(format, all, indent=indent)
149149
except Exception, e:
@@ -156,7 +156,7 @@ def get_models(self):
156156

157157
def get_model_from_name(self, search):
158158
"""Given a name of a model, return the model object associated with it
159-
159+
160160
The name can be either fully specified or uniquely matching the
161161
end of the model name. e.g.
162162
django.contrib.auth.User

test_utils/testmaker/processors/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _log_context(self, context):
116116
keys += self._get_context_keys(context)
117117
keys = set(keys)
118118

119-
# Skip some keys
119+
# Skip some keys
120120
for discardkey in DISCARD_CONTEXT_KEYS:
121121
keys.discard(discardkey)
122122

0 commit comments

Comments
 (0)