def test_claim_code_shows_awards_after_claim(self):
        user1 = self._get_user(username="creator",
                               email="creator@example.com")
        user2 = self._get_user(username="awardee",
                               email="awardee@example.com")
        b1 = Badge.objects.create(creator=user1, unique=False,
                                  title="Badge for claim viewing")
        da = DeferredAward(badge=b1, creator=user1)
        da.save()

        url = da.get_claim_url()

        # Before claim, code URL leads to claim page.
        r = self.client.get(url, follow=False)
        eq_(200, r.status_code)
        doc = pq(r.content)
        form = doc('form#claim_award')

        # After claim, code URL leads to a single award detail page.
        award = da.claim(user2)
        r = self.client.get(url, follow=False)
        eq_(302, r.status_code)
        award_url = reverse('badger.views.award_detail',
                            args=(award.badge.slug, award.pk))
        ok_(award_url in r['Location'])
Test dvr agents configured with "dvr_snat" are excluded.
dataset/ETHPy150Open mozilla/django-badger/badger/tests/test_views.py/BadgerViewsTest.test_claim_code_shows_awards_after_claim--crossover with--dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/db/test_l3_hamode_db.py/L3HATestCase.test_include_dvr_snat_agents_for_ha_candidates