Esempio n. 1
0
 def test_hub_award_creation_is_successful(self):
     user = get_user('us-ignite')
     award = fixtures.get_award(name='Gold star')
     data = {
         'user': user,
         'award': award,
     }
     instance = UserAward.objects.create(**data)
     ok_(instance.id)
     ok_(instance.created)
     eq_(instance.user, user)
     eq_(instance.award, award)
Esempio n. 2
0
 def test_hub_award_creation_is_successful(self):
     user = get_user('us-ignite')
     hub = get_hub()
     award = fixtures.get_award(name='Gold star')
     data = {
         'hub': hub,
         'award': award,
     }
     instance = HubAward.objects.create(**data)
     ok_(instance.id)
     ok_(instance.created)
     eq_(instance.hub, hub)
     eq_(instance.award, award)
Esempio n. 3
0
 def test_application_award_creation_is_successful(self):
     user = get_user('us-ignite')
     application = get_application(owner=user)
     award = fixtures.get_award(name='Gold star')
     data = {
         'application': application,
         'award': award,
     }
     instance = ApplicationAward.objects.create(**data)
     ok_(instance.id)
     ok_(instance.created)
     eq_(instance.application, application)
     eq_(instance.award, award)