'validate the db, since it can be an Instance of two different types'

@observe('db')
def _db_changed(self, change):

    new = change['new']
    connection_types = (DummyDB,)
    if (sqlite3 is not None):
        connection_types = (DummyDB, sqlite3.Connection)
    if (not isinstance(new, connection_types)):
        msg = ('%s.db    must    be    sqlite3    Connection    or    DummyDB,    not    %r' % (self.__class__.__name__, new))
        raise TraitError(msg)
