sqlobject.tests.test_auto module — SQLObject 3.9.1 documentation

# sqlobject.tests.test_auto module

class `sqlobject.tests.test_auto.` `Person`(**kw)

  Bases: `sqlobject.main.SQLObject`

  `j` = person
  property `name`
  `q` = person
  class `sqlmeta`(instance)

    Bases: `sqlobject.main.sqlmeta`

    `childName` = None
    `defaultOrder` = 'name'
    `idName` = 'id'
    `indexes` = []
    `joinDefinitions` = []
    `joins` = []
    `soClass`

      alias of `sqlobject.tests.test_auto.Person`

    `style` = <sqlobject.styles.MixedCaseUnderscoreStyle object>
    `table` = 'person'

class `sqlobject.tests.test_auto.` `Phone`(**kw)

  Bases: `sqlobject.main.SQLObject`

  `j` = phone
  property `phone`
  `q` = phone
  class `sqlmeta`(instance)

    Bases: `sqlobject.main.sqlmeta`

    `childName` = None
    `defaultOrder` = 'phone'
    `idName` = 'id'
    `indexes` = []
    `joinDefinitions` = []
    `joins` = []
    `soClass`

      alias of `sqlobject.tests.test_auto.Phone`

    `style` = <sqlobject.styles.MixedCaseUnderscoreStyle object>
    `table` = 'phone'

class `sqlobject.tests.test_auto.` `TestAuto`

  Bases: `object`

  `mssqlCreate` = "\n CREATE TABLE auto_test (\n auto_id int identity(1,1),\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT 0,\n created DATETIME NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun BIT default(0) NOT NULL\n )\n "
  `mssqlDrop` = '\n DROP TABLE auto_test\n '
  `mysqlCreate` = "\n CREATE TABLE IF NOT EXISTS auto_test (\n auto_id INT AUTO_INCREMENT PRIMARY KEY,\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT NULL,\n created DATETIME NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun TINYINT DEFAULT 0 NOT NULL\n )\n "
  `mysqlDrop` = '\n DROP TABLE IF EXISTS auto_test\n '
  `postgresCreate` = "\n CREATE TABLE auto_test (\n auto_id SERIAL PRIMARY KEY,\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT 0,\n created TIMESTAMP NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun BOOL DEFAULT FALSE NOT NULL\n )\n "
  `postgresDrop` = '\n DROP TABLE auto_test\n '
  `setup_method`(meth)
  `sqliteCreate` = "\n CREATE TABLE auto_test (\n auto_id INTEGER PRIMARY KEY AUTOINCREMENT ,\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT NULL,\n created DATETIME NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun INT DEFAULT 0 NOT NULL\n )\n "
  `sqliteDrop` = '\n DROP TABLE auto_test\n '
  `sybaseCreate` = "\n CREATE TABLE auto_test (\n auto_id integer,\n first_name VARCHAR(100),\n last_name VARCHAR(200) NOT NULL,\n age INT DEFAULT 0,\n created DATETIME NOT NULL,\n happy char(1) DEFAULT 'Y' NOT NULL,\n long_field TEXT,\n wannahavefun BIT default(0) NOT NULL\n )\n "
  `sybaseDrop` = '\n DROP TABLE auto_test\n '
  `teardown_method`(meth)
  `test_classCreate`()

class `sqlobject.tests.test_auto.` `TestPeople`

  Bases: `object`

  `setup_method`(meth)
  `test_collidingName`()
  `test_defaultOrder`()
  `test_dynamicColumn`()
  `test_dynamicJoin`()

`sqlobject.tests.test_auto.` `now`(tz=None)

  Returns new datetime object representing current time local to tz.

  > tz

  >   Timezone object.

  If no tz is specified, uses local timezone.