# Path: bluechips/model/types.py
# def localeconv():
#     def _to_python(self, value, state):
#     def __new__(cls, value):
#     def __int__(self):
#     def __float__(self):
#     def __long__(self):
#     def __cmp__(self, other):
#     def __mul__(self, other):
#     def __rmul__(self, other):
#     def __div__(self, other):
#     def __truediv__(self, other):
#     def __repr__(self):
#     def __str__(self):
#     def process_bind_param(self, value, engine):
#     def convert_result_value(self, value, engine):
# class CurrencyValidator(validators.FancyValidator):
# class Currency(object):
# class DBCurrency(sa.types.TypeDecorator):


from unittest import TestCase
from bluechips.model import types

class TestCurrency(TestCase):
    def setUp(self):
        self.c = types.Currency('12.34')

    def test_currency_float(self):
        assert float(self.c) == 1234.

    def test_currency_int(self):
        val = int(self.c)

# Path: bluechips/model/types.py
# def localeconv():
#     def _to_python(self, value, state):
#     def __new__(cls, value):
#     def __int__(self):
#     def __float__(self):
#     def __long__(self):
#     def __cmp__(self, other):
#     def __mul__(self, other):
#     def __rmul__(self, other):
#     def __div__(self, other):
#     def __truediv__(self, other):
#     def __repr__(self):
#     def __str__(self):
#     def process_bind_param(self, value, engine):
#     def convert_result_value(self, value, engine):
# class CurrencyValidator(validators.FancyValidator):
# class Currency(object):
# class DBCurrency(sa.types.TypeDecorator):


# Path: bluechips/tests/model/test_currency.py
from unittest import TestCase
from bluechips.model import types


class TestCurrency(TestCase):
    def setUp(self):
        self.c = types.Currency('12.34')

    def test_currency_float(self):
        assert float(self.c) == 1234.

    def test_currency_int(self):
        val = int(self.c)

        assert val == 1234