Skip to content

Commit

Permalink
Changed the currency test to a currency that is all ascii
Browse files Browse the repository at this point in the history
  • Loading branch information
regebro committed Feb 23, 2016
1 parent 9377845 commit 56bdb1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/z3c/currency/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ formatting the numerical value to a string.

>>> price.unit
u'$'
>>> price.unit = u''
>>> price.unit = u'SEK'
>>> price.unit
u'\xe2\x82\xac'
u'SEK'

Of course, both of those attributes are available as constructor arguments:

>>> price = field.Currency(
... title=u'Price',
... description=u'The price of the item.',
... precision=interfaces.DOLLARS,
... unit=u'')
... unit=u'SEK')

>>> price.precision is interfaces.DOLLARS
True
>>> price.unit
u'\xe2\x82\xac'
u'SEK'

Let's now have a look at the validation. First of all, the value must always
be a decimal:
Expand Down

0 comments on commit 56bdb1c

Please sign in to comment.