def test_badge_awarded_on_model_create(self):
        user = self._get_user()
        post = GuestbookEntry(message="This is my first post", creator=user)
        post.save()
        b = get_badge('first-post')
        ok_(b.is_awarded_to(user))

        # "first-post" badge should be unique
        post = GuestbookEntry(message="This is my first post", creator=user)
        post.save()
        eq_(1, Award.objects.filter(user=user, badge=b).count())
Close port
dataset/ETHPy150Open mozilla/django-badger/badger/tests/test_badges_py.py/BadgesPyTest.test_badge_awarded_on_model_create--crossover with--dataset/ETHPy150Open pyserial/pyserial/serial/serialposix.py/Serial.close