Exemplo n.º 1
0
 def test_assertions(self):
     create_mock_badge(self.usersettings)
     badge = self.usersettings.badges[0]
     assert_equals(len(badge.assertions), 0)
     for n in xrange(4):
         BadgeAssertion.create(badge, None)
         assert_equals(len(badge.assertions), n + 1)
Exemplo n.º 2
0
 def test_assertions(self):
     create_mock_badge(self.usersettings)
     badge = self.usersettings.badges[0]
     assert_equals(len(badge.assertions), 0)
     for n in xrange(4):
         BadgeAssertion.create(badge, None)
         assert_equals(len(badge.assertions), n + 1)
Exemplo n.º 3
0
 def test_recipient(self):
     assertion = BadgeAssertion.create(self.badge, self.project)
     test_data = {
         'idenity': self.project._id,
         'type': 'osfnode',
         'hashed': False
     }
     assert_equals(assertion.recipient, test_data)
Exemplo n.º 4
0
 def test_recipient(self):
     assertion = BadgeAssertion.create(self.badge, self.project)
     test_data = {
         'idenity': self.project._id,
         'type': 'osfnode',
         'hashed': False
     }
     assert_equals(assertion.recipient, test_data)
Exemplo n.º 5
0
 def test_awarder(self):
     assertion = BadgeAssertion.create(self.badge, self.project)
     assert_equals(assertion.awarder, self.usersettings)
Exemplo n.º 6
0
 def test_parent(self):
     assertion = BadgeAssertion.create(self.badge, self.project)
     assert_equals(assertion.badge, self.badge)
Exemplo n.º 7
0
 def test_parent(self):
     assertion = BadgeAssertion.create(self.badge, self.project)
     assert_equals(assertion.badge, self.badge)
Exemplo n.º 8
0
 def test_awarder(self):
     assertion = BadgeAssertion.create(self.badge, self.project)
     assert_equals(assertion.awarder, self.usersettings)