Ejemplo n.º 1
0
    def test_open_linkbases(self):
        files = ["xsd", "pre", "def", "cal", "lab"]
        pre_name = "abc-20130331_pre.xml"
        fake_filename = "xyz-20130331.xml"
        result = xbrl.open_linkbases(self.filename, files)

        for linkbase in result:
            self.assertIn(linkbase, files)
        self.assertEqual(len(result), 5)
        self.assertTrue(etree.iselement(result["pre"]["root"]))
        self.assertEqual(result["pre"]["filename"].split("/")[-1], pre_name)
        self.assertRaises(OSError, xbrl.open_linkbases, fake_filename, files)
Ejemplo n.º 2
0
 def setUp(self):
     instance_file = "tests/assets/abc-20130331.xml"
     files = ["xsd", "pre", "def", "cal", "lab"]
     self.linkbases = xbrl.open_linkbases(instance_file, files)
Ejemplo n.º 3
0
 def setUp(self):
     instance_file = "tests/assets/abc-20130331.xml"
     files = ["xsd", "pre", "def", "cal", "lab"]
     self.linkbases = xbrl.open_linkbases(instance_file, files)