1717from ..templatetags .fundraising_extras import (
1818 display_django_heroes ,
1919 donation_form_with_heart ,
20- gold_corporate_members ,
20+ top_and_gold_corporate_members ,
2121 top_corporate_members ,
2222)
2323
@@ -170,12 +170,12 @@ def test_with_diamond_members_and_platinum_members(self):
170170 self .assertEqual (members , expected )
171171
172172
173- class TestGoldCorporateMembers (TestCase ):
173+ class TestTopAndGoldCorporateMembers (TestCase ):
174174 past_date = date (2000 , 1 , 1 )
175175 future_date = date (3000 , 1 , 1 )
176176
177177 def test_with_no_gold_members (self ):
178- members = gold_corporate_members ()["members" ]
178+ members = top_and_gold_corporate_members ()["members" ]
179179 self .assertEqual (members , [])
180180
181181 def test_with_gold_members (self ):
@@ -187,22 +187,26 @@ def test_with_gold_members(self):
187187 member_2 .invoice_set .create (amount = 8 , expiration_date = self .future_date )
188188 member_3 .invoice_set .create (amount = 2 , expiration_date = self .future_date )
189189
190- members = gold_corporate_members ()["members" ]
190+ members = top_and_gold_corporate_members ()["members" ]
191191
192192 self .assertEqual (members , [member_2 , member_1 , member_3 ])
193193
194194 def test_with_gold_members_and_other_members (self ):
195195 member_1 = CorporateMember .objects .create (membership_level = 3 )
196196 member_2 = CorporateMember .objects .create (membership_level = 3 )
197197 member_3 = CorporateMember .objects .create (membership_level = 4 )
198+ member_4 = CorporateMember .objects .create (membership_level = 5 )
199+ member_5 = CorporateMember .objects .create (membership_level = 2 )
198200
199201 member_1 .invoice_set .create (amount = 4 , expiration_date = self .future_date )
200202 member_2 .invoice_set .create (amount = 8 , expiration_date = self .future_date )
201203 member_3 .invoice_set .create (amount = 2 , expiration_date = self .future_date )
204+ member_4 .invoice_set .create (amount = 2 , expiration_date = self .future_date )
205+ member_5 .invoice_set .create (amount = 2 , expiration_date = self .future_date )
202206
203- members = gold_corporate_members ()["members" ]
204- self .assertEqual (members , [member_2 , member_1 ])
205- self .assertNotIn (member_3 , members )
207+ members = top_and_gold_corporate_members ()["members" ]
208+ self .assertEqual (members , [member_4 , member_3 , member_2 , member_1 ])
209+ self .assertNotIn (member_5 , members )
206210
207211 def test_with_gold_members_and_expired_invoice (self ):
208212 member_1 = CorporateMember .objects .create (membership_level = 3 )
@@ -213,6 +217,6 @@ def test_with_gold_members_and_expired_invoice(self):
213217 member_2 .invoice_set .create (amount = 8 , expiration_date = self .future_date )
214218 member_3 .invoice_set .create (amount = 2 , expiration_date = self .past_date )
215219
216- members = gold_corporate_members ()["members" ]
220+ members = top_and_gold_corporate_members ()["members" ]
217221 self .assertEqual (members , [member_2 , member_1 ])
218222 self .assertNotIn (member_3 , members )
0 commit comments