Skip to content
This repository was archived by the owner on Sep 19, 2018. It is now read-only.

Commit b09a027

Browse files
committed
fixed indentation
1 parent f4e12d6 commit b09a027

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

web/tests/test_events_processors.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ def get_user(self):
1818
return User.objects.get(pk=1)
1919

2020
def create_event(self, title="Event title",
21-
start_date=datetime.datetime.now() + datetime.timedelta(days=0, hours=3),
22-
end_date=datetime.datetime.now() + datetime.timedelta(days=1, hours=3),
23-
country_code="SI",
24-
status="PENDING"):
21+
start_date=datetime.datetime.now() + datetime.timedelta(days=0, hours=3),
22+
end_date=datetime.datetime.now() + datetime.timedelta(days=1, hours=3),
23+
country_code="SI",
24+
status="PENDING"):
2525

2626
event_data = {
2727
"end_date": start_date,
@@ -35,7 +35,7 @@ def create_event(self, title="Event title",
3535
"location": "Ljubljana",
3636
"audience": [1],
3737
"theme": [1],
38-
"status": status,
38+
"status": status,
3939
}
4040
return create_or_update_event(**event_data)
4141

@@ -45,18 +45,18 @@ def setUp(self):
4545

4646
Event.objects.create(organizer="asdasd",
4747
creator=User.objects.filter(pk=1)[0],
48-
title="asdasd",
49-
description="asdsad",
50-
location="asdsad",
51-
start_date=datetime.datetime.now(),
52-
end_date=datetime.datetime.now(),
53-
event_url="http://eee.com",
54-
contact_person="[email protected]",
55-
country="SI",
56-
audience=[1],
57-
theme=[1],
58-
pub_date=datetime.datetime.now(),
59-
tags=["tag1", "tag2"])
48+
title="asdasd",
49+
description="asdsad",
50+
location="asdsad",
51+
start_date=datetime.datetime.now(),
52+
end_date=datetime.datetime.now(),
53+
event_url="http://eee.com",
54+
contact_person="[email protected]",
55+
country="SI",
56+
audience=[1],
57+
theme=[1],
58+
pub_date=datetime.datetime.now(),
59+
tags=["tag1", "tag2"])
6060

6161
def test_get_event(self):
6262
test_event = Event.objects.get(title="asdasd")
@@ -134,15 +134,15 @@ def test_get_approved_event_without_filter_returns_zero(self):
134134

135135
def test_get_approved_event_without_filter_with_pending_event(self):
136136
self.create_event(start_date=datetime.datetime.now() + datetime.timedelta(days=0, hours=3),
137-
end_date=datetime.datetime.now() + datetime.timedelta(days=1, hours=3),
138-
status="APPROVED",)
137+
end_date=datetime.datetime.now() + datetime.timedelta(days=1, hours=3),
138+
status="APPROVED",)
139139
events = get_approved_events()
140140
self.assertEqual(1, len(events))
141141

142142
def test_get_approved_event_without_filter_with_approved_event_but_passed_date(self):
143143
self.create_event(start_date=datetime.datetime.now() - datetime.timedelta(days=1, hours=3),
144-
end_date=datetime.datetime.now() - datetime.timedelta(days=2, hours=3),
145-
status="APPROVED")
144+
end_date=datetime.datetime.now() - datetime.timedelta(days=2, hours=3),
145+
status="APPROVED")
146146
events = get_approved_events()
147147
self.assertEqual(0, len(events))
148148

@@ -156,8 +156,8 @@ def test_get_approved_event_with_filter_country_code_and_order_with_approved_eve
156156
countries = ["IS", "DK", "FI", "FI", "LI"]
157157
for index, country in enumerate(countries):
158158
self.create_event(title="Testing event" + str(index + 1), country_code=country, status="APPROVED",
159-
start_date=datetime.datetime.now() + datetime.timedelta(days=0, hours=index + 1),
160-
end_date=datetime.datetime.now() + datetime.timedelta(days=1, hours=index + 1))
159+
start_date=datetime.datetime.now() + datetime.timedelta(days=0, hours=index + 1),
160+
end_date=datetime.datetime.now() + datetime.timedelta(days=1, hours=index + 1))
161161

162162
events = get_approved_events(order="start_date")
163163
self.assertEqual(5, len(events))
@@ -171,8 +171,8 @@ def test_get_approved_event_with_filter_country_code_and_order_and_limit__with_a
171171
countries = ["IS", "DK", "FI", "FI", "FI"]
172172
for index, country in enumerate(countries):
173173
self.create_event(title="Testing event" + str(index + 1), country_code=country, status="APPROVED",
174-
start_date=datetime.datetime.now() + datetime.timedelta(days=0, hours=index + 1),
175-
end_date=datetime.datetime.now() + datetime.timedelta(days=1, hours=index + 1))
174+
start_date=datetime.datetime.now() + datetime.timedelta(days=0, hours=index + 1),
175+
end_date=datetime.datetime.now() + datetime.timedelta(days=1, hours=index + 1))
176176

177177
events = get_approved_events(order="start_date", limit=2, country_code="FI")
178178
self.assertEqual(2, len(events))

web/tests/test_user_processors.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ def setUp(self):
1616

1717
Event.objects.create(organizer="asdasd",
1818
creator=User.objects.filter(pk=1)[0],
19-
title="asdasd",
20-
description="asdsad",
21-
location="asdsad",
22-
start_date=datetime.datetime.now(),
23-
end_date=datetime.datetime.now(),
24-
event_url="http://eee.com",
25-
contact_person="[email protected]",
26-
country="SI",
27-
audience=[1],
28-
theme=[1],
29-
pub_date=datetime.datetime.now(),
30-
tags=["tag1", "tag2"])
19+
title="asdasd",
20+
description="asdsad",
21+
location="asdsad",
22+
start_date=datetime.datetime.now(),
23+
end_date=datetime.datetime.now(),
24+
event_url="http://eee.com",
25+
contact_person="[email protected]",
26+
country="SI",
27+
audience=[1],
28+
theme=[1],
29+
pub_date=datetime.datetime.now(),
30+
tags=["tag1", "tag2"])
3131

3232
def test_get_ambassadors_for_country(self):
3333
self.up1.country = "SI"

0 commit comments

Comments
 (0)