'SeriesParser: Series with dates'

def test_date_id(self, parse):

    s = parse(name=u'Something', data=u'Something.2010.10.25')
    assert (s.identifier == u'2010-10-25'), (u'failed    to    parse    %s' % s.data)
    assert (s.id_type == u'date')
    s = parse(name=u'Something', data=u'Something    2010-10-25')
    assert (s.identifier == u'2010-10-25'), (u'failed    to    parse    %s' % s.data)
    assert (s.id_type == u'date')
    s = parse(name=u'Something', data=u'Something    10/25/2010')
    assert (s.identifier == u'2010-10-25'), (u'failed    to    parse    %s' % s.data)
    assert (s.id_type == u'date')
    s = parse(name=u'Something', data=u'Something    25.10.2010')
    assert (s.identifier == u'2010-10-25'), (u'failed    to    parse    %s' % s.data)
    assert (s.id_type == u'date')
    s = parse(name=u'Something', data=u'Something    1.2.11')
    assert (s.identifier == u'2011-02-01'), (u'failed    to    parse    %s' % s.data)
    assert (s.id_type == u'date')
    s = parse(name=u'Something', data=u'Something    01.02.32')
    assert (s.id_type != u'date')
    s = parse(name=u'Something', data=u'Something.2010.10.25,    Part    2')
    assert (s.identifier == u'2010-10-25'), (u'failed    to    parse    %s' % s.data)
    assert (s.id_type == u'date')
    s = parse(name=u'Something', data=u'Something    (18th    july    2013)')
    assert (s.identifier == u'2013-07-18'), (u'failed    to    parse    %s' % s.data)
    assert (s.id_type == u'date')
    s = parse(name=u'Something', data=u'Something    2    mar    2013)')
    assert (s.identifier == u'2013-03-02'), (u'failed    to    parse    %s' % s.data)
    assert (s.id_type == u'date')
    s = parse(name=u'Something', data=u'Something    1st    february    1993)')
    assert (s.identifier == u'1993-02-01'), (u'failed    to    parse    %s' % s.data)
    assert (s.id_type == u'date')
