lists.arthurdejong.org
RSS feed

python-stdnum commit: r106 - python-stdnum/stdnum/nl

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum commit: r106 - python-stdnum/stdnum/nl



Author: arthur
Date: Fri Feb 10 14:22:49 2012
New Revision: 106
URL: http://arthurdejong.org/viewvc/python-stdnum?revision=106&view=revision

Log:
fix number in test and ensure that number is not all zeroes

Modified:
   python-stdnum/stdnum/nl/btw.py

Modified: python-stdnum/stdnum/nl/btw.py
==============================================================================
--- python-stdnum/stdnum/nl/btw.py      Fri Feb 10 14:19:48 2012        (r105)
+++ python-stdnum/stdnum/nl/btw.py      Fri Feb 10 14:22:49 2012        (r106)
@@ -19,9 +19,9 @@
 
 """Module for handling Dutch VAT (BTW) numbers.
 
->>> is_valid('00449544B01')
+>>> is_valid('004495445B01')
 True
->>> is_valid('NL449544B01')
+>>> is_valid('NL4495445B01')
 True
 >>> is_valid('123456789B90')
 False
@@ -49,5 +49,5 @@
         return False
     return len(number) == 12 and \
            number[9] == 'B' and \
-           number[10:].isdigit() and \
+           number[10:].isdigit() and int(number[10:]) > 0 and \
            bsn.is_valid(number[0:9])
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits/