Example #1
0
 def test_show_tables(self):
   shutil.copy('dumptruck/fixtures/landbank_branches.sqlite', self.DBNAME)
   sqlite._connect(self.DBNAME)
   observed = sqlite.show_tables()
   expected = {
     'blocks': 'CREATE TABLE `blocks` (`blockPerson` text, `date_scraped` real, `region` text, `blockId` integer, `blockName` text)',
     'branches': 'CREATE TABLE `branches` (`town` text, `date_scraped` real, `Fax` text, `Tel` text, `address_raw` text, `blockId` integer, `postcode` text, `address` text, `branchName` text, `street-address` text)'
   }
   self.assertDictEqual(observed, expected)
Example #2
0
 def test_show_tables(self):
   shutil.copy('dumptruck/fixtures/landbank_branches.sqlite',self.DBNAME)
   sqlite._connect(self.DBNAME)
   observed = set([name for name in sqlite.show_tables()])
   expected = set(['blocks','branches'])
   self.assertSetEqual(observed, expected)