def test_conference_date_returns_date_when_record_has_a_date():
    with_a_date = {'date': '26-30 Mar 2012'}

    expected = '26-30 Mar 2012'
    result = conference_date(with_a_date)

    assert expected == result
def test_conference_date_returns_empty_string_when_no_closing_date():
    no_closing_date = {'opening_date': '2015-03-14'}

    expected = ''
    result = conference_date(no_closing_date)

    assert expected == result
Beispiel #3
0
def test_conference_date_returns_empty_string_when_no_closing_date():
    no_closing_date = {'opening_date': '2015-03-14'}

    expected = ''
    result = conference_date(no_closing_date)

    assert expected == result
Beispiel #4
0
def test_conference_date_returns_date_when_record_has_a_date():
    with_a_date = {'date': '26-30 Mar 2012'}

    expected = '26-30 Mar 2012'
    result = conference_date(with_a_date)

    assert expected == result
def test_conference_date_returns_empty_string_when_no_opening_date():
    no_opening_date = InspireRecord({'closing_date': '2015-03-21'})

    expected = ''
    result = conference_date(no_opening_date)

    assert expected == result
Beispiel #6
0
def test_conference_date_returns_empty_string_when_no_opening_date():
    no_opening_date = InspireRecord({'closing_date': '2015-03-21'})

    expected = ''
    result = conference_date(no_opening_date)

    assert expected == result
def test_conference_date_formats_date_when_different_year():
    different_year = {
        'opening_date': '2012-12-31',
        'closing_date': '2013-01-01'
    }

    expected = '31 Dec 2012 - 01 Jan 2013'
    result = conference_date(different_year)

    assert expected == result
def test_conference_date_formats_date_when_same_year_different_month():
    same_year_different_month = {
        'opening_date': '2012-05-28',
        'closing_date': '2012-06-01'
    }

    expected = '28 May - 01 Jun 2012'
    result = conference_date(same_year_different_month)

    assert expected == result
def test_conference_date_formats_date_when_same_year_same_month():
    same_year_same_month = {
        'opening_date': '2015-03-14',
        'closing_date': '2015-03-21'
    }

    expected = '14-21 Mar 2015'
    result = conference_date(same_year_same_month)

    assert expected == result
Beispiel #10
0
def test_conference_date_formats_date_when_different_year():
    different_year = {
        'opening_date': '2012-12-31',
        'closing_date': '2013-01-01'
    }

    expected = '31 Dec 2012 - 01 Jan 2013'
    result = conference_date(different_year)

    assert expected == result
Beispiel #11
0
def test_conference_date_formats_date_when_same_year_different_month():
    same_year_different_month = {
        'opening_date': '2012-05-28',
        'closing_date': '2012-06-01'
    }

    expected = '28 May - 01 Jun 2012'
    result = conference_date(same_year_different_month)

    assert expected == result
Beispiel #12
0
def test_conference_date_formats_date_when_same_year_same_month():
    same_year_same_month = {
        'opening_date': '2015-03-14',
        'closing_date': '2015-03-21'
    }

    expected = '14-21 Mar 2015'
    result = conference_date(same_year_same_month)

    assert expected == result