Ejemplo n.º 1
0
    def test_DeleteTable_not_exist(self):
        service = self.service()
        table = "table.to_delete"

        service.tables.delete = Mock(side_effect=HttpError('url', b'content'))

        job = DeleteTable(service)
        success = job.run(table)

        self.assertFalse(success)
Ejemplo n.º 2
0
    def test_DeleteTable(self):
        service = self.service()
        table = "table.to_delete"

        job = DeleteTable(service)
        success = job.run(table)

        service.tables.delete.assert_called_with(**_table(PROJECT_ID, table))
        self.assertTrue(job.is_complete)
        self.assertTrue(success)