Esempio n. 1
0
    def test_bulk_dump(self):
        """Test Xco2.bulk_dump()"""
        from src.formatdata import bulk_dump
        print('#### TEST5 ####')
        session2 = dbProxy.create_session(db='test', engine=self.engine)
        util_truncate_table(session2, [Xco2, Areas])

        bulk_dump(create_generator_from_dataset(self.dataset, 8))
        rows = self.session.query(Xco2).count()
        try:
            self.assertEqual(rows, 8)
            print('PASSED')
        except AssertionError:
            print('FAILED')
Esempio n. 2
0
    def test_bulk_dump(self):
        """Test Xco2.bulk_dump()"""
        from src.formatdata import bulk_dump
        print('#### TEST5 ####')
        session2 = dbProxy.create_session(db='test', engine=self.engine)
        util_truncate_table(session2, [Xco2, Areas])

        bulk_dump(
            create_generator_from_dataset(self.dataset, 8)
        )
        rows = self.session.query(Xco2).count()
        try:
            self.assertEqual(rows, 8)
            print('PASSED')
        except AssertionError:
            print('FAILED')
Esempio n. 3
0
 def tearDown(self):
     # if you want to keep the data in the db to make test using psql,
     # comment the line below
     util_truncate_table(self.session, [Xco2, Areas])
     del self.session
     pass
 def tearDown(self):
     util_truncate_table(self.session, table=[Xco2, Areas])
     pass
Esempio n. 5
0
 def tearDown(self):
     # if you want to keep the data in the db to make test using psql,
     # comment the line below
     util_truncate_table(self.session, [Xco2, Areas])
     del self.session
     pass
Esempio n. 6
0
 def tearDown(self):
     util_truncate_table(self.session, table=[Xco2, Areas])
     pass
Esempio n. 7
0
 def tearDown(self):
     util_truncate_table(self.session, [Xco2, Areas])
     del self.session
     pass
Esempio n. 8
0
 def tearDown(self):
     util_truncate_table(self.session, [Xco2, Areas])
     del self.session
     pass