示例#1
0
    def test_with_territory_code_eng(self):
        expected = expected_sopn_publish_date("local.2019-05-02", "ENG")

        assert expected == date(2019, 4, 4)
示例#2
0
    def test_with_territory_code_unambiguous_election_type(self):
        expected = expected_sopn_publish_date(
            "nia.belfast-east.2017-03-02", "NIR"
        )

        assert expected == date(2017, 2, 8)
示例#3
0
    def test_with_territory_code_malformed_id(self):
        expected = expected_sopn_publish_date("whoknows", "ENG")

        assert expected is None
示例#4
0
    def test_with_territory_code_unknown(self):
        expected = expected_sopn_publish_date("local.2019-05-02", "-")

        assert expected is None