Skip to content

Commit

Permalink
Arreglo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloCastellano committed Apr 21, 2016
1 parent fb3e3b7 commit 339c395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bormeparser/tests/test_borme.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
class BormeTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.borme = bormeparser.parse(os.path.join(EXAMPLES_PATH, 'BORME-A-2015-27-10.pdf'))
cls.borme = bormeparser.parse(os.path.join(EXAMPLES_PATH, 'BORME-A-2015-27-10.pdf'), SECCION.A)

def test_instance(self):
self.assertEqual(self.borme.date, datetime.date(year=2015, month=2, day=10))
Expand Down
11 changes: 1 addition & 10 deletions bormeparser/tests/test_bormeparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ def test_download_xml(self):
# TODO: Get size from xml: urlPdf/szBytes
def test_download_pdf(self):
path = os.path.join(tempfile.gettempdir(), 'BORME-A-2015-102-29.pdf')
downloaded = bormeparser.download_pdf(self.date, path, bormeparser.SECCION.A, bormeparser.PROVINCIA.MALAGA)
self.assertTrue(downloaded)
bormeparser.download_pdf(self.date, path, bormeparser.SECCION.A, bormeparser.PROVINCIA.MALAGA)
self.assertEqual(os.path.getsize(path), 202795)
os.unlink(path)

Expand All @@ -154,13 +153,5 @@ def test_download_pdfs(self):
pass


class BormeparserParserTestCase(unittest.TestCase):
date = (2015, 6, 2)

def test_parser(self):
path = os.path.join(tempfile.gettempdir(), 'BORME-A-2015-102-29.pdf')
# data = parse(path)
pass

if __name__ == '__main__':
unittest.main()

0 comments on commit 339c395

Please sign in to comment.