Commit fe458109 authored by Bram in 't Zandt's avatar Bram in 't Zandt
Browse files

Add unit tests for has_been_member and has_been_honorary_member

parent ff3211a1
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-18 10:57+0200\n"
"PO-Revision-Date: 2017-09-18 10:57+0200\n"
"POT-Creation-Date: 2017-09-20 21:09+0200\n"
"PO-Revision-Date: 2017-09-20 21:10+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -740,6 +740,3 @@ msgstr "Oud-lid"
#: views.py:133
msgid "Former supporter"
msgstr "Oud-begunstiger"
#~ msgid "Former "
#~ msgstr "Oud-"
......@@ -61,6 +61,30 @@ class MemberBirthdayTest(TestCase):
self._assert_thom('1992-12-31', '1995-01-01')
class MemberTest(TestCase):
fixtures = ['members.json']
def test_has_been_member(self):
member = Member.objects.get(pk=1)
self.assertTrue(member.has_been_member())
m1 = member.membership_set.all()[0]
m1.type = 'honorary'
m1.save()
self.assertFalse(member.has_been_member())
def test_has_been_honorary_member(self):
member = Member.objects.get(pk=1)
self.assertFalse(member.has_been_honorary_member())
m1 = member.membership_set.all()[0]
m1.type = 'honorary'
m1.save()
self.assertTrue(member.has_been_honorary_member())
class MembershipFilterTest(TestCase):
@classmethod
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment