memdb core and basic tests