# Path: uamobile/willcom.py
# class WillcomUserAgent(UserAgent):
#     name = 'WILLCOM'
#     carrier = 'WILLCOM'
#     short_carrier = 'W'
# 
#     def __init__(self, *args, **kwds):
#         super(WillcomUserAgent, self).__init__(*args, **kwds)
#         self.serialnumber = None
#         self.model_version = None
#         self.browser_version = None
# 
#     def get_flash_version(self):
#         """
#         returns Flash Lite version.
#         """
#         return None
#     flash_version = property(get_flash_version)
# 
#     def supports_cookie(self):
#         # TODO
#         # I'm not sure All WILLCOM phones can handle HTTP cookie.
#         return True
# 
#     def make_display(self):
#         """
#         create a new Display object.
#         """
#         return Display()
# 
#     def is_willcom(self):
#         return True
# 
#     def is_airhphone(self):
#         return True
# 
# Path: uamobile/factory/willcom.py
# class WillcomUserAgentFactory(AbstractUserAgentFactory):
#     device_class = WillcomUserAgent
#     parser       = CachingWillcomUserAgentParser()


from tests import msg
from uamobile import *
from uamobile.willcom import WillcomUserAgent
from uamobile.factory.willcom import WillcomUserAgentFactory
        assert ua.model_version == model_version, ua.model_version
        assert ua.browser_version == browser_version, '%r expected, actual %r' % (browser_version, ua.browser_version)
        if cache_size is not None:
            assert ua.cache_size == cache_size
        else:
            assert ua.cache_size is None
        assert ua.display is not None
        assert ua.serialnumber is None
        assert ua.supports_cookie() == True

    for args in DATA:
        yield tuple([inner] + list(args))


def test_display_default():
    ua = detect({'HTTP_USER_AGENT':'Mozilla/3.0(WILLCOM;KYOCERA/WX310K/2;1.2.7.17.000000/0.1/C100) Opera 7.0'})
    assert ua.display.width != 0
    assert ua.display.height != 0
    assert ua.display.color
    assert ua.display.depth
    assert ua.display.is_vga() is False
    assert ua.display.is_qvga() is True

def test_strip_serialnumber():
    value = 'Mozilla/3.0(WILLCOM;KYOCERA/WX310K/2;1.2.7.17.000000/0.1/C100) Opera 7.0'
    ua = detect({'HTTP_USER_AGENT': value})
    assert ua.strip_serialnumber() == value


def test_is_bogus():

# Path: uamobile/willcom.py
# class WillcomUserAgent(UserAgent):
#     name = 'WILLCOM'
#     carrier = 'WILLCOM'
#     short_carrier = 'W'
# 
#     def __init__(self, *args, **kwds):
#         super(WillcomUserAgent, self).__init__(*args, **kwds)
#         self.serialnumber = None
#         self.model_version = None
#         self.browser_version = None
# 
#     def get_flash_version(self):
#         """
#         returns Flash Lite version.
#         """
#         return None
#     flash_version = property(get_flash_version)
# 
#     def supports_cookie(self):
#         # TODO
#         # I'm not sure All WILLCOM phones can handle HTTP cookie.
#         return True
# 
#     def make_display(self):
#         """
#         create a new Display object.
#         """
#         return Display()
# 
#     def is_willcom(self):
#         return True
# 
#     def is_airhphone(self):
#         return True
# 
# Path: uamobile/factory/willcom.py
# class WillcomUserAgentFactory(AbstractUserAgentFactory):
#     device_class = WillcomUserAgent
#     parser       = CachingWillcomUserAgentParser()


# Path: tests/test_willcom.py
from tests import msg
from uamobile import *
from uamobile.willcom import WillcomUserAgent
from uamobile.factory.willcom import WillcomUserAgentFactory

        assert ua.model_version == model_version, ua.model_version
        assert ua.browser_version == browser_version, '%r expected, actual %r' % (browser_version, ua.browser_version)
        if cache_size is not None:
            assert ua.cache_size == cache_size
        else:
            assert ua.cache_size is None
        assert ua.display is not None
        assert ua.serialnumber is None
        assert ua.supports_cookie() == True

    for args in DATA:
        yield tuple([inner] + list(args))


def test_display_default():
    ua = detect({'HTTP_USER_AGENT':'Mozilla/3.0(WILLCOM;KYOCERA/WX310K/2;1.2.7.17.000000/0.1/C100) Opera 7.0'})
    assert ua.display.width != 0
    assert ua.display.height != 0
    assert ua.display.color
    assert ua.display.depth
    assert ua.display.is_vga() is False
    assert ua.display.is_qvga() is True

def test_strip_serialnumber():
    value = 'Mozilla/3.0(WILLCOM;KYOCERA/WX310K/2;1.2.7.17.000000/0.1/C100) Opera 7.0'
    ua = detect({'HTTP_USER_AGENT': value})
    assert ua.strip_serialnumber() == value


def test_is_bogus():

    def func(ip, expected):