from recensio.policy import importSehepunkte
from recensio.policy.browser.sehepunkte import Import
from recensio.policy.importSehepunkte import sehepunkte_parser

import pkg_resources
import unittest2 as unittest


testdata_filename = pkg_resources.resource_filename(__name__, "testSehepunkte.xml")
testdata_parsed = [
    {
        "authors": [{"firstname": "Mathias", "lastname": "Piana"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17542.html",
        "category": "Kunstgeschichte",
        "isbn": "978-3-86568-039-6",
        "issue": "11",
        "pages": "495",
        "placeOfPublication": "Petersberg",
        "publisher": "Michael Imhof Verlag",
        "reviewAuthors": [{"firstname": "Lorenz", "lastname": "Korn"}],
        "series": "Studien zur internationalen Architektur- und Kunstgeschichte",
        "subtitle": "",
        "title": u"Burgen und St\xe4dte der Kreuzzugszeit",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2008",
    },
    {
        "authors": [{"firstname": "Mathias", "lastname": "Piana"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17542.html",
        "category": "Kunstgeschichte",
        "isbn": "978-3-86568-039-7",
        "issue": "11",
        "pages": "495",
        "placeOfPublication": "Petersberg",
        "publisher": "Michael Imhof Verlag",
        "reviewAuthors": [{"firstname": "Lorenz", "lastname": "Korn"}],
        "series": (
            "Studien zur internationalen Architektur- und " "Kunstgeschichte Teil 2"
        ),
        "subtitle": "",
        "title": u"Burgen und St\xe4dte der Kreuzzugszeit",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2008",
    },
    {
        "authors": [{"firstname": "Hans", "lastname": "Belting"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17750.html",
        "category": "Kunstgeschichte",
        "isbn": "978-3-406-57092-6",
        "issue": "11",
        "pages": "319",
        "placeOfPublication": u"M\xfcnchen",
        "publisher": "C.H.Beck",
        "reviewAuthors": [{"firstname": "Lorenz", "lastname": "Korn"}],
        "series": "",
        "subtitle": u"Eine west\xf6stliche Geschichte des Blicks",
        "title": "Florenz und Bagdad",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [
            {"firstname": "Jonathan M.", "lastname": "Bloom"},
            {"firstname": "Sheila S.", "lastname": "Blair"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17543.html",
        "category": "Kunstgeschichte",
        "isbn": "978-0-19-530991-1",
        "issue": "11",
        "pages": "CII + 1586",
        "placeOfPublication": "Oxford",
        "publisher": "Oxford University Press",
        "reviewAuthors": [{"firstname": "Lorenz", "lastname": "Korn"}],
        "series": "",
        "subtitle": "",
        "title": "The Grove Encyclopedia of Islamic Art and Architecture",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "", "lastname": "Museum with no Frontiers"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18515.html",
        "category": "Kunstgeschichte",
        "isbn": "",
        "issue": "11",
        "pages": "",
        "placeOfPublication": "",
        "publisher": "",
        "reviewAuthors": [{"firstname": "Eva-Maria", "lastname": "Troelenberg"}],
        "series": "",
        "subtitle": "Webportal. URL: http://www.discoverislamicart.org",
        "title": "Discover Islamic Art",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "",
    },
    {
        "authors": [{"firstname": "Ellen", "lastname": "Kenney"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17779.html",
        "category": "Kunstgeschichte",
        "isbn": "978-0-9708199-4-9",
        "issue": "11",
        "pages": "XIV + 257",
        "placeOfPublication": "Chicago",
        "publisher": "Chicago Studies on the Middle East",
        "reviewAuthors": [{"firstname": "Verena", "lastname": "Daiber"}],
        "series": "Chicago Studies on the Middle East",
        "subtitle": "The Architecture and Urban Works of Tankiz Al-Nasiri",
        "title": "Power and Patronage in Medieval Syria",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Christian", "lastname": "Ewert"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17746.html",
        "category": "Kunstgeschichte",
        "isbn": "978-3-88609-564-3",
        "issue": "11",
        "pages": "143",
        "placeOfPublication": "Berlin",
        "publisher": u"Staatliche Museen Preu\xdfischer Kulturbesitz",
        "reviewAuthors": [{"firstname": "Verena", "lastname": "Daiber"}],
        "series": "Forschungen zur Islamischen Kunstgeschichte. Neue Folge",
        "subtitle": (
            u"Strukturen und Dekorelemente der Malereien im "
            u"Aleppozimmer des Museums f\xfcr Islamische Kunst in "
            u"Berlin"
        ),
        "title": "Das Aleppozimmer",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2006",
    },
    {
        "authors": [
            {"firstname": "Julia", "lastname": "Gonnella"},
            {"firstname": "Jens", "lastname": u"Kr\xf6ger"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17746.html",
        "category": "Kunstgeschichte",
        "isbn": "978-3-930454-82-2",
        "issue": "11",
        "pages": "XXIV + 197",
        "placeOfPublication": u"M\xfcnster",
        "publisher": "Rhema Verlag",
        "reviewAuthors": [{"firstname": "Verena", "lastname": "Daiber"}],
        "series": "",
        "subtitle": (
            u"The Aleppo Room in Berlin. International Symposium of the "
            u"Museum f\xfcr Islamische Kunst - Staatliche Museen zu "
            u"Berlin 12.-14. April 2002"
        ),
        "title": "Angels, Peonies, and Fabulous Creatures",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2008",
    },
    {
        "authors": [{"firstname": "Christiane J.", "lastname": "Gruber"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_19127.html",
        "category": "Kunstgeschichte",
        "isbn": "978-84-95061-29-4",
        "issue": "11",
        "pages": "432",
        "placeOfPublication": "Valencia",
        "publisher": "Patrimonio Ediciones",
        "reviewAuthors": [{"firstname": "Vera", "lastname": "Beyer"}],
        "series": "",
        "subtitle": "A Study of Text and Image in a Pan-Asian Context",
        "title": (
            u"El Libro de la Ascensi\xf3n Mi&#703;rajnama Tim\xfarida. The "
            "Timurid Book of Ascension (Mi&#703;rajnama)"
        ),
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2008",
    },
    {
        "authors": [{"firstname": "Adnan", "lastname": "Shiyyab"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17270.html",
        "category": "Kunstgeschichte",
        "isbn": "978-3-8316-0545-3",
        "issue": "11",
        "pages": "328",
        "placeOfPublication": u"M\xfcnchen",
        "publisher": "Herbert Utz Verlag",
        "reviewAuthors": [{"firstname": "Ute", "lastname": "Verstegen"}],
        "series": "Kunstwissenschaften",
        "subtitle": (
            u"Arch\xe4ologische und kunstgeschichtliche Untersuchungen "
            u"unter besonderer Ber\xfccksichtigung der \xbbKirche von "
            u"Ya'mun\xab"
        ),
        "title": u"Der Islam und der Bilderstreit in Jordanien und Pal\xe4stina",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2006",
    },
    {
        "authors": [
            {"firstname": "Wolfgang", "lastname": "Sellert"},
            {"firstname": "Ursula", "lastname": "Machoczek"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17657.html",
        "category": u"Fr\xfche Neuzeit",
        "isbn": "978-3-503-09886-6",
        "issue": "11",
        "pages": "773",
        "placeOfPublication": "Berlin",
        "publisher": "Erich Schmidt Verlag",
        "reviewAuthors": [{"firstname": "Anja", "lastname": "Amend-Traut"}],
        "series": "",
        "subtitle": "Serie II: Antiqua Band 1: Karton 1-43",
        "title": "Die Akten des kaiserlichen Reichshofrats (RHR)",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Larissa", "lastname": u"F\xf6rster"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17739.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-593-391601",
        "issue": "11",
        "pages": "391",
        "placeOfPublication": "Frankfurt/M.",
        "publisher": "Campus",
        "reviewAuthors": [{"firstname": u"D\xf6rte", "lastname": "Lerp"}],
        "series": "",
        "subtitle": (
            "Wie Deutsche und Herero in Namibia des Kriegs von 1904 " "gedenken"
        ),
        "title": "Postkoloniale Erinnerungslandschaften",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Efrem", "lastname": "Zambon"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_15037.html",
        "category": "Altertum",
        "isbn": "978-3-515-09194-7",
        "issue": "11",
        "pages": "326",
        "placeOfPublication": "Stuttgart",
        "publisher": "Franz Steiner Verlag",
        "reviewAuthors": [{"firstname": "Caroline", "lastname": "Veit"}],
        "series": "Historia. Einzelschriften",
        "subtitle": "Sicily between Hellenism and Rome",
        "title": "Tradition and Innovation",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2008",
    },
    {
        "authors": [{"firstname": "Holger", "lastname": u"L\xf6ttel"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17203.html",
        "category": "19. Jahrhundert",
        "isbn": "978-3-515-09334-7",
        "issue": "11",
        "pages": "468",
        "placeOfPublication": "Stuttgart",
        "publisher": "Franz Steiner Verlag",
        "reviewAuthors": [{"firstname": "John Andreas", "lastname": "Fuchs"}],
        "series": "Transatlantische Historische Studien",
        "subtitle": (
            u"Englandbilder im amerikanischen S\xfcden und die "
            u"Au\xdfenpolitik der Konf\xf6deration"
        ),
        "title": "Um Ehre und Anerkennung",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Paul", "lastname": "Griffiths"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_16539.html",
        "category": u"Fr\xfche Neuzeit",
        "isbn": "978-0-521-88524-9",
        "issue": "11",
        "pages": "XVII + 544",
        "placeOfPublication": "Cambridge",
        "publisher": "Cambridge University Press",
        "reviewAuthors": [{"firstname": u"Andr\xe9", "lastname": "Krischer"}],
        "series": "Cambridge Social and Cultural Histories",
        "subtitle": "Change, Crime, and Control in the Capital City, 1550-1660",
        "title": "Lost Londons",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2008",
    },
    {
        "authors": [{"firstname": "Robert", "lastname": "Bees"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_16440.html",
        "category": "Altertum",
        "isbn": "978-3-406-58804-4",
        "issue": "11",
        "pages": "320",
        "placeOfPublication": u"M\xfcnchen",
        "publisher": "C.H.Beck",
        "reviewAuthors": [{"firstname": "Claas", "lastname": "Lattmann"}],
        "series": "Zetemata. Monographien zur klassischen Altertumswissenschaft",
        "subtitle": u"Interpretationen zum Verst\xe4ndnis seiner Theologie",
        "title": "Aischylos",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Keith", "lastname": "Sidwell"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17278.html",
        "category": "Altertum",
        "isbn": "978-0-521-51998-4",
        "issue": "11",
        "pages": "XV + 407",
        "placeOfPublication": "Cambridge",
        "publisher": "Cambridge University Press",
        "reviewAuthors": [{"firstname": "Johannes", "lastname": "Engels"}],
        "series": "",
        "subtitle": ("The Politics of Satirical Comedy during the Peloponnesian " "War"),
        "title": "Aristophanes the Democrat",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Sebastian", "lastname": "Joost"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_15377.html",
        "category": u"Fr\xfche Neuzeit",
        "isbn": "978-3-8258-1062-7",
        "issue": "11",
        "pages": "270",
        "placeOfPublication": u"M\xfcnster / Hamburg / Berlin / London",
        "publisher": "LIT",
        "reviewAuthors": [{"firstname": "Dirk", "lastname": "Schleinert"}],
        "series": "Rostocker Schriften zur Regionalgeschichte",
        "subtitle": (
            u"Ausw\xe4rtige Politik als Mittel zur Durchsetzung "
            "landesherrlicher Macht in Mecklenburg (1648-1695)"
        ),
        "title": "Zwischen Hoffnung und Ohnmacht",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [
            {"firstname": "Pit", "lastname": u"P\xe9port\xe9"},
            {"firstname": "Sonja", "lastname": "Kmec"},
            {"firstname": u"Beno\xeet", "lastname": "Majerus"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17942.html",
        "category": "19. Jahrhundert",
        "isbn": "978-90-04-18176-2",
        "issue": "11",
        "pages": "XII + 383",
        "placeOfPublication": "Leiden / Boston / Tokyo",
        "publisher": "Brill Academic Publishers",
        "reviewAuthors": [{"firstname": "Norbert", "lastname": "Franz"}],
        "series": "National Cultivation of Culture",
        "subtitle": "Representations of the Past, Space and Language from the Nineteenth to the Twenty-First Century",
        "title": "Inventing Luxembourg",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [
            {"firstname": "Sven Oliver", "lastname": u"M\xfcller"},
            {"firstname": "Philipp", "lastname": "Ther"},
            {"firstname": "Jutta", "lastname": "Toelle"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17686.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-486-59236-8",
        "issue": "11",
        "pages": "331",
        "placeOfPublication": u"M\xfcnchen",
        "publisher": "Oldenbourg",
        "reviewAuthors": [{"firstname": "Boris", "lastname": "Slamka"}],
        "series": u"Die Gesellschaft der Oper. Musikkultur europ\xe4ischer Metropolen im 19. und 20. Jahrhundert",
        "subtitle": "Kulturtransfers und Netzwerke des Musiktheaters in Europa",
        "title": "Die Oper im Wandel der Gesellschaft",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Gilles", "lastname": "Gorre"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17187.html",
        "category": "Altertum",
        "isbn": "978-9-0429-2035-4",
        "issue": "11",
        "pages": "LVIII + 641",
        "placeOfPublication": "Leuven",
        "publisher": "Peeters",
        "reviewAuthors": [{"firstname": "Arthur", "lastname": "Verhoogt"}],
        "series": "Studia Hellenistica",
        "subtitle": "",
        "title": u"Les relations du clerg\xe9 \xe9gyptien et des lagides d'apr\xe8s des sources priv\xe9es",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Michael", "lastname": "Maaser"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18641.html",
        "category": u"Fr\xfche Neuzeit",
        "isbn": "978-3-515-09177-0",
        "issue": "11",
        "pages": "222",
        "placeOfPublication": "Stuttgart",
        "publisher": "Franz Steiner Verlag",
        "reviewAuthors": [{"firstname": "Elizabeth", "lastname": "Harding"}],
        "series": "Frankfurter Historische Abhandlungen",
        "subtitle": u"Herzog Julius (1528-1589) und die Universit\xe4t Helmstedt",
        "title": "Humanismus und Landesherrschaft",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Finbarr B.", "lastname": "Flood"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17748.html",
        "category": "Kunstgeschichte",
        "isbn": "978-0-6911-2594-7",
        "issue": "11",
        "pages": "XV + 366",
        "placeOfPublication": "Princeton / Oxford",
        "publisher": "Princeton University Press",
        "reviewAuthors": [{"firstname": "Daniel", "lastname": "Redlinger"}],
        "series": "",
        "subtitle": 'Material Culture and Medieval "Hindu-Muslim" Encounter',
        "title": "Objects of Translation",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [
            {"firstname": "Karin", "lastname": "Bartl"},
            {"firstname": "Abd al-Razzaq", "lastname": "Moaz"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17744.html",
        "category": "Kunstgeschichte",
        "isbn": "978-3-89646-654-9",
        "issue": "11",
        "pages": "XVI + 541",
        "placeOfPublication": "Rahden/Westf.",
        "publisher": "Verlag Marie Leidorf",
        "reviewAuthors": [{"firstname": "Mustafa", "lastname": "Tupev"}],
        "series": u"Orient-Arch\xe4ologie",
        "subtitle": u"Transformationsprozesse von der Sp\xe4tantike bis in fr\xfchislamische Zeit in Bilad as-Sham. Beitr\xe4ge des Internationalen Kolloquiums in Damaskus vom 5.-9. November 2006",
        "title": "Residenzen, Befestigungen, Siedlungen",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2008",
    },
    {
        "authors": [
            {"firstname": "Lorenz", "lastname": "Korn"},
            {"firstname": "Markus", "lastname": "Ritter"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18635.html",
        "category": "Kunstgeschichte",
        "isbn": "978-3-89500-766-8",
        "issue": "11",
        "pages": "246",
        "placeOfPublication": "Wiesbaden",
        "publisher": "Reichert Verlag",
        "reviewAuthors": [{"firstname": "Jens", "lastname": u"Kr\xf6ger (i.R.)"}],
        "series": "Jahrbuch der Ernst-Herzfeld-Gesellschaft e.V.",
        "subtitle": "",
        "title": u"Beitr\xe4ge zur islamischen Kunst und Arch\xe4ologie Band 2",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [
            {"firstname": "Robert", "lastname": "Hillenbrand"},
            {"firstname": "Sylvia", "lastname": "Auld"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18634.html",
        "category": "Kunstgeschichte",
        "isbn": "978-1-901435-06-1",
        "issue": "11",
        "pages": "x + 517",
        "placeOfPublication": "London",
        "publisher": "Altajir Trust",
        "reviewAuthors": [{"firstname": "Mathias", "lastname": "Piana"}],
        "series": "",
        "subtitle": "The Holy City in Context 1187-1250",
        "title": "Ayyubid Jerusalem",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Mahmoud K.", "lastname": "Hawari"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18634.html",
        "category": "Kunstgeschichte",
        "isbn": "978-1-4073-0042-9",
        "issue": "11",
        "pages": "XXI + 214",
        "placeOfPublication": "Oxford",
        "publisher": "Archaeopress",
        "reviewAuthors": [{"firstname": "Mathias", "lastname": "Piana"}],
        "series": "BAR International Series",
        "subtitle": "An architectural and archaeological study",
        "title": "Ayyubid Jerusalem (1187 - 1250)",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2007",
    },
    {
        "authors": [
            {"firstname": "Werner", "lastname": "Freitag"},
            {"firstname": "Christian", "lastname": "Helbich"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18627.html",
        "category": u"Fr\xfche Neuzeit",
        "isbn": "978-3-402-15043-6",
        "issue": "11",
        "pages": "318",
        "placeOfPublication": u"M\xfcnster",
        "publisher": "Aschendorff",
        "reviewAuthors": [{"firstname": "Christoph", "lastname": "Nebgen"}],
        "series": u"Westfalen in der Vormoderne. Studien zur mittelalterlichen und fr\xfchneuzeitlichen Landesgeschichte",
        "subtitle": "Neue Forschungen zu Reformation und Konfessionalisierung in Westfalen",
        "title": "Bekenntnis, soziale Ordnung und rituelle Praxis",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Arndt", "lastname": "Brendecke"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_16636.html",
        "category": u"Fr\xfche Neuzeit",
        "isbn": "978-3-412-20399-3",
        "issue": "11",
        "pages": "486",
        "placeOfPublication": u"K\xf6ln / Weimar / Wien",
        "publisher": u"B\xf6hlau",
        "reviewAuthors": [{"firstname": "Pedro", "lastname": u"Mart\xednez Garc\xeda"}],
        "series": "",
        "subtitle": "Funktion des Wissens in der spanischen Kolonialherrschaft",
        "title": "Imperium und Empirie",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "John", "lastname": "Darwin"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_16547.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-0-521-30208-1",
        "issue": "11",
        "pages": "XIII + 800",
        "placeOfPublication": "Cambridge",
        "publisher": "Cambridge University Press",
        "reviewAuthors": [{"firstname": "Verena", "lastname": "Steller"}],
        "series": "",
        "subtitle": "The Rise and Fall of the British World-Systen, 1830-1970",
        "title": "The Empire Project",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": u"J\xfcrgen Peter", "lastname": "Schmied"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18488.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-406-60585-7",
        "issue": "11",
        "pages": "683",
        "placeOfPublication": u"M\xfcnchen",
        "publisher": "C.H.Beck",
        "reviewAuthors": [{"firstname": "Florian", "lastname": "Keisinger"}],
        "series": "",
        "subtitle": "Eine Biographie",
        "title": "Sebastian Haffner",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [
            {"firstname": "Kai", "lastname": "Brodersen"},
            {"firstname": "Ja&#347;", "lastname": "Elsner"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17165.html",
        "category": "Altertum",
        "isbn": "978-3-515-09426-9",
        "issue": "11",
        "pages": "171",
        "placeOfPublication": "Stuttgart",
        "publisher": "Franz Steiner Verlag",
        "reviewAuthors": [{"firstname": "Stefano", "lastname": "Magnani"}],
        "series": "Historia. Einzelschriften",
        "subtitle": "Working Papers on P.Artemid. (St. John's College Oxford, 2008)",
        "title": 'Images and Texts on the "Artemidorus Papyrus"',
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [
            {"firstname": "Keith", "lastname": "Hamilton"},
            {"firstname": "Patrick", "lastname": "Salmon"},
            {"firstname": "Stephen", "lastname": "Twigge"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_14507.html",
        "category": "Zeitgeschichte",
        "isbn": "978-0-415-44870-3",
        "issue": "11",
        "pages": "VIII + 119",
        "placeOfPublication": "London / New York",
        "publisher": "Routledge",
        "reviewAuthors": [{"firstname": "Dominik", "lastname": "Geppert"}],
        "series": "",
        "subtitle": "Berlin in the Cold War, 1948-1990",
        "title": "Documents on British Policy Overseas, Series III, Vol. VI",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Fritz J.", "lastname": "Raddatz"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18783.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-498-05781-7",
        "issue": "11",
        "pages": "941",
        "placeOfPublication": "Reinbek",
        "publisher": "Rowohlt Verlag",
        "reviewAuthors": [{"firstname": "Florian", "lastname": "Keisinger"}],
        "series": "",
        "subtitle": "Jahre 1982-2001",
        "title": u"Tageb\xfccher",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Annette", "lastname": "Jantzen"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17733.html",
        "category": "19. Jahrhundert",
        "isbn": "978-3-506-76873-5",
        "issue": "11",
        "pages": "367",
        "placeOfPublication": "Paderborn",
        "publisher": u"Ferdinand Sch\xf6ningh",
        "reviewAuthors": [{"firstname": "Joachim", "lastname": "Schmiedl"}],
        "series": u"Ver\xf6ffentlichungen der Kommission f\xfcr Zeitgeschichte. Reihe B: Forschungen",
        "subtitle": u"Els\xe4ssische und franz\xf6sisch-lothringische Geistliche im Ersten Weltkrieg",
        "title": "Priester im Krieg",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Jana", "lastname": "Osterkamp"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_19041.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-465-04073-6",
        "issue": "11",
        "pages": "X + 310",
        "placeOfPublication": "Frankfurt /M.",
        "publisher": "Vittorio Klostermann",
        "reviewAuthors": [{"firstname": "Peter", "lastname": "Bugge"}],
        "series": u"Studien zur europ\xe4ischen Rechtsgeschichte",
        "subtitle": u"Verfassungsidee - Demokratieverst\xe4ndnis - Nationalit\xe4tenproblem",
        "title": "Verfassungsgerichtsbarkeit in der Tschechoslowakei (1920-1939)",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [
            {"firstname": "Gertrude", "lastname": "Enderle-Burcel"},
            {"firstname": "Piotr", "lastname": "Franaszek"},
            {"firstname": "Dieter", "lastname": "Stiefel"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_19040.html",
        "category": "Zeitgeschichte",
        "isbn": "978-83-233-2532-1",
        "issue": "11",
        "pages": "XVI + 293",
        "placeOfPublication": u"Krak\xf3w",
        "publisher": "WUJ",
        "reviewAuthors": [{"firstname": "Uwe", "lastname": u"M\xfcller"}],
        "series": "",
        "subtitle": "Econnomic relations between neutral and socialist countries in Cold War Europe",
        "title": "Gaps in the Iron Curtain",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Otfrid", "lastname": "Pustejovsky"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_19039.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-8258-1703-9",
        "issue": "11",
        "pages": "296",
        "placeOfPublication": u"M\xfcnster / Hamburg / Berlin / London",
        "publisher": "LIT",
        "reviewAuthors": [{"firstname": "Martin", "lastname": u"Z\xfcckert"}],
        "series": u"Beitr\xe4ge zu Theologie, Kirche und Gesellschaft im 20. Jahrhundert",
        "subtitle": u"Eine Bestandsaufnahme zu den Verh\xe4ltnissen im Sudetenland und dem Protektorat B\xf6hmen und M\xe4hren",
        "title": u"Christlicher Widerstand gegen die NS-Herrschaft in den B\xf6hmischen L\xe4ndern",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Tobias", "lastname": "Weger"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_19035.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-631-58554-2",
        "issue": "11",
        "pages": "513",
        "placeOfPublication": "Bern / Frankfurt a.M. [u.a.]",
        "publisher": "Peter Lang",
        "reviewAuthors": [{"firstname": "Stefan", "lastname": "Dyroff"}],
        "series": "Mitteleuropa - Osteuropa",
        "subtitle": "Wirkung - Interaktion - Rezeption",
        "title": u"Grenz\xfcberschreitende Biographien zwischen Ost- und Mitteleuropa",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Christine", "lastname": "Koch-Hallas"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18240.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-374-02687-6",
        "issue": "11",
        "pages": "420",
        "placeOfPublication": "Leipzig",
        "publisher": "Evangelische Verlagsanstalt",
        "reviewAuthors": [{"firstname": "Martin", "lastname": "Greschat"}],
        "series": "Arbeiten zur Kirchen- und Theologiegeschichte",
        "subtitle": u"Eine Untersuchung \xfcber Kontinuit\xe4ten und Diskontinuit\xe4ten einer landeskirchlichen Identit\xe4t",
        "title": u"Die Evangelisch-Lutherische Kirche in Th\xfcringen in der SBZ und Fr\xfchzeit der DDR (1945-1961)",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Ahlrich", "lastname": "Meyer"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18702.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-506-77023-3",
        "issue": "11",
        "pages": "238",
        "placeOfPublication": "Paderborn",
        "publisher": u"Ferdinand Sch\xf6ningh",
        "reviewAuthors": [{"firstname": "Katja", "lastname": "Happe"}],
        "series": "",
        "subtitle": u'T\xe4ter und Opfer der "Endl\xf6sung" in Westeuropa',
        "title": "Das Wissen um Auschwitz",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Stefanie", "lastname": "Middendorf"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17343.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-8353-0542-7",
        "issue": "11",
        "pages": "507",
        "placeOfPublication": u"G\xf6ttingen",
        "publisher": "Wallstein",
        "reviewAuthors": [{"firstname": "Dietmar", "lastname": u"H\xfcser"}],
        "series": "Moderne Zeit. Neue Forschungen zur Gesellschafts- und Kulturgeschichte des 19. und 20. Jahrhunderts",
        "subtitle": u"Zur Wahrnehmung gesellschaftlicher Modernit\xe4t in Frankreich 1880 - 1980",
        "title": "Massenkultur",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Bogdan", "lastname": "Musial"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18607.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-549-07370-4",
        "issue": "11",
        "pages": "507",
        "placeOfPublication": u"Berlin / M\xfcnchen",
        "publisher": u"Propyl\xe4en",
        "reviewAuthors": [{"firstname": "Rainer", "lastname": "Karlsch"}],
        "series": "",
        "subtitle": u"Die Pl\xfcnderung Deutschlands und der Aufstieg der Sowjetunion zur Weltmacht",
        "title": "Stalins Beutezug",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Martin", "lastname": "Greschat"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18543.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-506-76806-3",
        "issue": "11",
        "pages": "454",
        "placeOfPublication": "Paderborn",
        "publisher": u"Ferdinand Sch\xf6ningh",
        "reviewAuthors": [{"firstname": "Clemens", "lastname": "Vollnhals"}],
        "series": "",
        "subtitle": "Kirche, Politik und Gesellschaft  im geteilten Deutschland 1945-1963",
        "title": "Protestantismus im Kalten Krieg",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "K. Erik", "lastname": "Franzen"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18295.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-486-59150-7",
        "issue": "11",
        "pages": "IX + 520",
        "placeOfPublication": u"M\xfcnchen",
        "publisher": "Oldenbourg",
        "reviewAuthors": [{"firstname": "Susanne", "lastname": "Greiter"}],
        "series": u"Ver\xf6ffentlichungen des Collegium Carolinum",
        "subtitle": u"Die Schirmherrschaft \xfcber die Sudetendeutschen 1954-1974",
        "title": "Der vierte Stamm Bayerns",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Daniel", "lastname": "Lenski"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18207.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-933816-41-2",
        "issue": "11",
        "pages": "171",
        "placeOfPublication": "Berlin",
        "publisher": "Edition Kirchhof & Franke",
        "reviewAuthors": [{"firstname": "Tim", "lastname": "Szatkowski"}],
        "series": "",
        "subtitle": u"Das Amtsverst\xe4ndnis der ersten f\xfcnf Bundespr\xe4sidenten unter besonderer Ber\xfcckichtigung ihrer verfassungsrechtlichen Kompetenzen",
        "title": "Von Heuss bis Carstens",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Volker", "lastname": "Zimmermann"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18414.html",
        "category": "Zeitgeschichte",
        "isbn": "978-3-8375-0296-1",
        "issue": "11",
        "pages": "639",
        "placeOfPublication": "Essen",
        "publisher": "Klartext",
        "reviewAuthors": [{"firstname": "Hermann", "lastname": "Wentker"}],
        "series": u"Ver\xf6ffentlichungen zur Kultur und Geschichte im \xf6stlichen Europa",
        "subtitle": "Die Beziehungen zwischen der SBZ/DDR und der Tschechoslowakei (1945-1969)",
        "title": "Eine sozialistische Freundschaft im Wandel",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Michael", "lastname": "Klinkenberg"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17304.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-8253-5585-2",
        "issue": "11",
        "pages": "662",
        "placeOfPublication": "Heidelberg",
        "publisher": u"Universit\xe4tsverlag Winter",
        "reviewAuthors": [{"firstname": "Tonia", "lastname": u"Sch\xfcller"}],
        "series": "",
        "subtitle": "",
        "title": u"Das Orientbild in der franz\xf6sischen Literatur und Malerei vom 17. Jahrhundert bis zum fin de si\xe8cle",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Stephen F.", "lastname": "Dale"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18550.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-0-521-69142-0",
        "issue": "11",
        "pages": "XIV + 347",
        "placeOfPublication": "Cambridge",
        "publisher": "Cambridge University Press",
        "reviewAuthors": [{"firstname": "Tonia", "lastname": u"Sch\xfcller"}],
        "series": "",
        "subtitle": "",
        "title": "The Muslim Empires of the Ottomans, Safavids, and Mughals",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Benny", "lastname": "Morris"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_14920.html",
        "category": "Zeitgeschichte",
        "isbn": "978-0-300-12696-9",
        "issue": "11",
        "pages": "xiv + 524",
        "placeOfPublication": "New Haven / London",
        "publisher": "Yale University Press",
        "reviewAuthors": [{"firstname": "Wolfgang G.", "lastname": "Schwanitz"}],
        "series": "",
        "subtitle": "A History of the First Arab-Israeli War",
        "title": "1948",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2008",
    },
    {
        "authors": [
            {"firstname": "Bettina", "lastname": u"Gr\xe4f"},
            {"firstname": "Jakob", "lastname": "Skovgaard-Petersen"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_16198.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-1-85065-939-6",
        "issue": "11",
        "pages": "XI + 262",
        "placeOfPublication": "London",
        "publisher": "C. Hurst & Co",
        "reviewAuthors": [{"firstname": "Wolfgang G.", "lastname": "Schwanitz"}],
        "series": "",
        "subtitle": "The Phenomenon of Yusuf al-Qaradawi",
        "title": "Global Mufti",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [
            {"firstname": "Lorenz", "lastname": "Korn"},
            {"firstname": "Eva", "lastname": "Orthmann"},
            {"firstname": "Florian", "lastname": "Schwarz"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17971.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-89500-675-3",
        "issue": "11",
        "pages": "319",
        "placeOfPublication": "Wiesbaden",
        "publisher": "Reichert Verlag",
        "reviewAuthors": [{"firstname": "Jens", "lastname": "Scheiner"}],
        "series": "",
        "subtitle": "Arabica et Iranica ad honorem Heinz Gaube",
        "title": "Die Grenzen der Welt",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2008",
    },
    {
        "authors": [
            {"firstname": "Stephan", "lastname": "Conermann"},
            {"firstname": "Syrinx von", "lastname": "Hees"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_19082.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-936912-12-8",
        "issue": "11",
        "pages": "382",
        "placeOfPublication": "Schenefeld",
        "publisher": "EB-Verlag",
        "reviewAuthors": [{"firstname": "Assia Maria", "lastname": "Harwazinski"}],
        "series": "Bonner Islamstudien",
        "subtitle": u"Historische Anthropologie. Ans\xe4tze und M\xf6glichkeiten",
        "title": "Islamwissenschaft als Kulturwissenschaft I",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2007",
    },
    {
        "authors": [
            {"firstname": "Angelika", "lastname": "Schaser"},
            {"firstname": "Stefanie", "lastname": u"Sch\xfcler-Springorum"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18795.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-515-09319-4",
        "issue": "11",
        "pages": "224",
        "placeOfPublication": "Stuttgart",
        "publisher": "Franz Steiner Verlag",
        "reviewAuthors": [{"firstname": "Horst", "lastname": "Sassin"}],
        "series": u"Stiftung Bundespr\xe4sident-Theodor-Heuss-Haus. Wissenschaftliche Reihe",
        "subtitle": "In- und Exklusionsprozesse im Kaiserreich und in der Weimarer Republik",
        "title": "Liberalismus und Emanzipation",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2010",
    },
    {
        "authors": [{"firstname": "Hans-Joachim", "lastname": "Behr"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_18485.html",
        "category": "19. Jahrhundert",
        "isbn": "978-3-89710-435-8",
        "issue": "11",
        "pages": "462",
        "placeOfPublication": "Paderborn",
        "publisher": "Bonifatius",
        "reviewAuthors": [{"firstname": "Wilhelm", "lastname": "Ribhegge"}],
        "series": u"Studien und Quellen zur westf\xe4lischen Geschichte",
        "subtitle": "Das Leben des Freiherrn Georg von Vincke (1811-1875)",
        "title": u'"Recht mu\xdf doch Recht bleiben"',
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [
            {"firstname": "Ina", "lastname": "Eichner"},
            {"firstname": "Vasiliki", "lastname": "Tsamakda"},
        ],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17970.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-89500-674-6",
        "issue": "11",
        "pages": "VIII + 296",
        "placeOfPublication": "Wiesbaden",
        "publisher": "Reichert Verlag",
        "reviewAuthors": [{"firstname": "Jens", "lastname": "Scheiner"}],
        "series": u"Sp\xe4tantike - Fr\xfches Christentum - Byzanz. Kunst im ersten Jahrtausend. Reihe B: Studien und Perspektiven",
        "subtitle": "",
        "title": u"Syrien und seine Nachbarn von der Sp\xe4tantike bis in die islamische Zeit",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Klaus", "lastname": "Kreiser"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17429.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-406-59063-4",
        "issue": "11",
        "pages": "320",
        "placeOfPublication": u"M\xfcnchen",
        "publisher": "C.H.Beck",
        "reviewAuthors": [{"firstname": "Tilmann", "lastname": "Kulke"}],
        "series": "",
        "subtitle": u"Ein historischer Stadtf\xfchrer",
        "title": "Istanbul",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Mathias", "lastname": "Rohe"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_16363.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-406-57955-4",
        "issue": "11",
        "pages": "XV + 606",
        "placeOfPublication": u"M\xfcnchen",
        "publisher": "C.H.Beck",
        "reviewAuthors": [{"firstname": "Heidrun", "lastname": "Eichner"}],
        "series": "",
        "subtitle": "Geschichte und Gegenwart",
        "title": "Das islamische Recht",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
    {
        "authors": [{"firstname": "Samir", "lastname": "Suleiman"}],
        "canonical_uri": "http://www.sehepunkte.de/export/rezension_17982.html",
        "category": u"Epochen\xfcbergreifend",
        "isbn": "978-3-86858-330-4",
        "issue": "11",
        "pages": "280",
        "placeOfPublication": "Aachen",
        "publisher": "Shaker Verlag",
        "reviewAuthors": [{"firstname": "Tonia", "lastname": u"Sch\xfcller"}],
        "series": "",
        "subtitle": u"Ein Beitrag zur interkulturellen Verst\xe4ndigung",
        "title": u"Der Islam muss kein R\xe4tsel sein",
        "volume": "10",
        "year": "2010",
        "yearOfPublication": "2009",
    },
]


class FakeLogger(object):
    def __init__(self):
        self.reset()

    def reset(self):
        self.errors = []

    def error(self, error):
        self.errors.append(error)


class FakeImport(Import):
    def __init__(self, request={}):
        self.request = request


class TestSehepunkteImport(unittest.TestCase):
    def setUp(self):
        self.fake_logger = FakeLogger()
        importSehepunkte.logger = self.fake_logger

    def tearDown(self):
        pass

    def testImportGood(self):
        data = [x for x in sehepunkte_parser.parse(file(testdata_filename).read())]
        self.maxDiff = None
        self.assertEquals(testdata_parsed, list(data))

    def testImportBad(self):
        data1 = file(testdata_filename).read()
        data2 = data1.replace('<review id="17542">', "<somethingelse>")
        data2 = data2.replace("</review>", "</somethingelse>", 1)
        data1 = sehepunkte_parser.parse(data1)
        data2 = sehepunkte_parser.parse(data2)
        # Two because I am lazy. The first result contains two books that results in two results
        # the replace above can only break the first import.
        self.assertEquals(len(list(data1)), len(list(data2)) + 2)

    def testEncodingFunny1(self):
        from recensio.policy.browser.sehepunkte import superclean

        data = "Hallo &#255; Argl&#203bla"
        self.assertEquals(u"Hallo \xff Argl\xcbbla", superclean(data))

    def testGetTargetURLs(self):
        urls = FakeImport()._getTargetURLs()
        self.assertEqual(len(list(urls)), 3)
        urls = FakeImport(request={"past_months": 1})._getTargetURLs()
        self.assertEqual(len(list(urls)), 3)
        urls = FakeImport(request={"past_months": 2})._getTargetURLs()
        self.assertEqual(len(list(urls)), 4)
        urls = FakeImport(request={"past_months": 12})._getTargetURLs()
        self.assertEqual(len(list(urls)), 14)
