Ejemplo n.º 1
0
def test_unicode_data_id():
    base64, human = data_id("a", dt(2012, 1, 1, 12, 0, 0, "UTC"), "week",
                            ['one', u"© ☯ ☮"])

    assert_is_instance(human, str)
    assert_that(human, is_(str("a_20120101120000_week_one_© ☯ ☮")))
    assert_that(base64,
                is_("YV8yMDEyMDEwMTEyMDAwMF93ZWVrX29uZV_CqSDimK8g4piu"))
Ejemplo n.º 2
0
def test_data_id():
    assert_that(
        data_id("a", dt(2012, 1, 1, 12, 0, 0, "UTC"), "week", ['one', 'two']),
        is_(
            ("YV8yMDEyMDEwMTEyMDAwMF93ZWVrX29uZV90d28=",
             "a_20120101120000_week_one_two")
        )
    )
Ejemplo n.º 3
0
def test_unicode_data_id():
    base64, human = data_id(
        "a",
        dt(2012, 1, 1, 12, 0, 0, "UTC"),
        "week",
        ['one', u"© ☯ ☮"])

    assert_is_instance(human, str)
    assert_that(human, is_(str("a_20120101120000_week_one_© ☯ ☮")))
    assert_that(base64,
                is_("YV8yMDEyMDEwMTEyMDAwMF93ZWVrX29uZV_CqSDimK8g4piu"))
Ejemplo n.º 4
0
def test_data_id():
    assert_that(
        data_id("a", dt(2012, 1, 1, 12, 0, 0, "UTC"), "week", ['one', 'two']),
        is_(("YV8yMDEyMDEwMTEyMDAwMF93ZWVrX29uZV90d28=",
             "a_20120101120000_week_one_two")))