The Assimilation Project  based on Assimilation version
cma.tests.store_test Namespace Reference

Data Structures

class  aTestDrone
class  aTestIPaddr
class  aTestNIC
class  aTestSystem
class  Person
class  TestCase
class  TestCreateOps
class  TestDatabaseWrites
class  TestGeneralQuery
class  TestRelateOps


def assert_no_dangling_Cclasses (doassert=None)
def CreateIndexes (db, indexlist)
def initstore ()
 mys = Store(db, uniqueindexmap=uniqueindexes, classkeymap=keymap) More...


bool DEBUG = False
bool CheckForDanglingClasses = True
bool AssertOnDanglingClasses = True
int WorstDanglingCount = 0
bool version_printed = False
list Classes = [Person, aTestSystem, aTestDrone, aTestIPaddr, aTestNIC]
dictionary keymap
dictionary uniqueindexes = {}

Function Documentation

def cma.tests.store_test.assert_no_dangling_Cclasses (   doassert = None)

Definition at line 50 of file

References cma.AssimCclasses.dump_c_objects(), and proj_class_live_object_count().

Referenced by cma.tests.store_test.TestCase.teardown_method().

Here is the call graph for this function:

Here is the caller graph for this function:

def cma.tests.store_test.CreateIndexes (   db,

Definition at line 98 of file

Referenced by cma.tests.store_test.initstore().

Here is the caller graph for this function:

def cma.tests.store_test.initstore ( )

mys = Store(db, uniqueindexmap=uniqueindexes, classkeymap=keymap)

fred = System('Fred') fred.addroles('server') fred.addroles(['server', 'switch']) print fred.designation print fred.roles

Annika = Person('Annika', 'Hansen') print seven.designation print seven.roles print Annika.firstname, Annika.lastname

Definition at line 224 of file

References cma.tests.store_test.CreateIndexes().

Referenced by cma.tests.store_test.TestDatabaseWrites.test_create_and_query(), cma.tests.store_test.TestCreateOps.test_drone(), cma.tests.store_test.TestGeneralQuery.test_multicolumn_query(), cma.tests.store_test.TestCreateOps.test_nic(), cma.tests.store_test.TestCreateOps.test_person(), cma.tests.store_test.TestRelateOps.test_relate1(), cma.tests.store_test.TestRelateOps.test_relate2(), cma.tests.store_test.TestRelateOps.test_separate1(), and cma.tests.store_test.TestCreateOps.test_system().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

bool cma.tests.store_test.AssertOnDanglingClasses = True

Definition at line 37 of file

bool cma.tests.store_test.CheckForDanglingClasses = True

Definition at line 36 of file

list cma.tests.store_test.Classes = [Person, aTestSystem, aTestDrone, aTestIPaddr, aTestNIC]

Definition at line 198 of file

bool cma.tests.store_test.DEBUG = False

Definition at line 35 of file

dictionary cma.tests.store_test.keymap
Initial value:
1 = {'Person': {'index':'Person','kattr': 'lastname', 'vattr': 'firstname'},
2  'aTestSystem': {'index':'aTestSystem','kattr': 'designation', 'value': 'global'},
3  'aTestDrone': {'index':'aTestDrone','kattr': 'designation', 'value': 'global'},
4  'aTestIPaddr': {'index':'aTestIPaddr','kattr': 'ipaddr', 'value': 'global'},
5  'aTestNIC': {'index':'aTestNIC','kattr': 'MACaddr', 'value': 'global'}
6  }

Definition at line 200 of file

dictionary cma.tests.store_test.uniqueindexes = {}

Definition at line 206 of file

bool cma.tests.store_test.version_printed = False

Definition at line 48 of file

int cma.tests.store_test.WorstDanglingCount = 0

Definition at line 39 of file