Did I find the right examples for you? yes no

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/d/j/django-lfs-HEAD/lfs/manage/voucher/views.py   django-lfs(Download)
 
        for i in range(0, amount):
            number = lfs.voucher.utils.create_voucher_number()
            counter = 0
            while Voucher.objects.filter(number=number).exists() and counter < 100:
                number = lfs.voucher.utils.create_voucher_number()

src/d/j/django-lfs-0.7.7/lfs/manage/voucher/views.py   django-lfs(Download)
                try:
                    Voucher.objects.create(
                        number=lfs.voucher.utils.create_voucher_number(),
                        group=voucher_group,
                        creator=request.user,

src/d/j/django-lfs-HEAD/lfs/voucher/tests.py   django-lfs(Download)
    def test_create_vouchers_1(self):
        """Tests the default voucher options
        """
        number = lfs.voucher.utils.create_voucher_number()
        self.failUnless(len(number) == 5)
            )
 
        number = lfs.voucher.utils.create_voucher_number()
        self.failUnless(len(number) == 8)
 

src/d/j/django-lfs-0.7.7/lfs/voucher/tests.py   django-lfs(Download)
    def test_create_vouchers_1(self):
        """Tests the default voucher options
        """
        number = lfs.voucher.utils.create_voucher_number()
        self.failUnless(len(number) == 5)
            )
 
        number = lfs.voucher.utils.create_voucher_number()
        self.failUnless(len(number) == 8)