O'Reilly logo

Python Testing Cookbook. by Bhaskar N. Das, Greg L. Turnquist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

In these steps, we will see how to build tests that are aimed at different servers:

  1. Create an alternate version of the SQL script called recipe62_network.mysql used in earlier recipes that uses MySQL conventions, as shown here:
DROP TABLE IF EXISTS SERVICE_MAPPING;DROP TABLE IF EXISTS SERVICE_EVENTS;DROP TABLE IF EXISTS ACTIVE_EVENTS;DROP TABLE IF EXISTS EQUIPMENT;DROP TABLE IF EXISTS SERVICE;DROP TABLE IF EXISTS EVENTS;CREATE TABLE EQUIPMENT (ID SMALLINT PRIMARY KEY AUTO_INCREMENT,HOST_NAME TEXT,STATUS SMALLINT);CREATE TABLE SERVICE (ID SMALLINT PRIMARY KEY AUTO_INCREMENT,NAME TEXT,STATUS TEXT);CREATE TABLE SERVICE_MAPPING (ID SMALLINT PRIMARY KEY AUTO_INCREMENT,SERVICE_FK SMALLINT,EQUIPMENT_FK SMALLINT);CREATE TABLE EVENTS ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required