Index: trunk/ippdb/tests/alloc.c
===================================================================
--- trunk/ippdb/tests/alloc.c	(revision 8325)
+++ trunk/ippdb/tests/alloc.c	(revision 8368)
@@ -1042,4 +1042,33 @@
 
     {
+        detNormalizedStatImfileRow *object;
+
+        object = detNormalizedStatImfileRowAlloc(-32, -32, "a string", 32.32    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->norm == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
         detNormalizedImfileRow *object;
 
Index: trunk/ippdb/tests/createtable.c
===================================================================
--- trunk/ippdb/tests/createtable.c	(revision 8325)
+++ trunk/ippdb/tests/createtable.c	(revision 8368)
@@ -403,4 +403,19 @@
         }
 
+        if(!detNormalizedStatImfileCreateTable(dbh)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
         if(!detNormalizedImfileCreateTable(dbh)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/dbcleanup.c
===================================================================
--- trunk/ippdb/tests/dbcleanup.c	(revision 8325)
+++ trunk/ippdb/tests/dbcleanup.c	(revision 8368)
@@ -37,4 +37,5 @@
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detProcessedImfile");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detStackedImfile");
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detNormalizedStatImfile");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detNormalizedImfile");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detMasterFrame");
Index: trunk/ippdb/tests/dbsetup.c
===================================================================
--- trunk/ippdb/tests/dbsetup.c	(revision 8325)
+++ trunk/ippdb/tests/dbsetup.c	(revision 8368)
@@ -91,4 +91,7 @@
     detStackedImfileCreateTable(dbh);
 
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detNormalizedStatImfile");
+    detNormalizedStatImfileCreateTable(dbh);
+
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detNormalizedImfile");
     detNormalizedImfileCreateTable(dbh);
Index: trunk/ippdb/tests/droptable.c
===================================================================
--- trunk/ippdb/tests/droptable.c	(revision 8325)
+++ trunk/ippdb/tests/droptable.c	(revision 8368)
@@ -403,4 +403,19 @@
         }
 
+        if (!detNormalizedStatImfileDropTable(dbh)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detNormalizedImfileDropTable(dbh)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insert.c
===================================================================
--- trunk/ippdb/tests/insert.c	(revision 8325)
+++ trunk/ippdb/tests/insert.c	(revision 8368)
@@ -403,4 +403,19 @@
         }
 
+        if (!detNormalizedStatImfileInsert(dbh, -32, -32, "a string", 32.32)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detNormalizedImfileInsert(dbh, -32, -32, "a string", "a string", "a string")) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insertfits.c
===================================================================
--- trunk/ippdb/tests/insertfits.c	(revision 8325)
+++ trunk/ippdb/tests/insertfits.c	(revision 8368)
@@ -700,4 +700,30 @@
         }
 
+        if (!detNormalizedStatImfileInsertFits(dbh, fits)) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!psFitsClose(fits)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+        psFits          *fits;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        // open a temp
+        fits = psFitsOpen(TMP_FILENAME, "r");
+        if (!fits) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detNormalizedImfileInsertFits(dbh, fits)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insertobject.c
===================================================================
--- trunk/ippdb/tests/insertobject.c	(revision 8325)
+++ trunk/ippdb/tests/insertobject.c	(revision 8368)
@@ -579,4 +579,26 @@
     {
         psDB            *dbh;
+        detNormalizedStatImfileRow *object;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        object = detNormalizedStatImfileRowAlloc(-32, -32, "a string", 32.32);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedStatImfileInsertObject(dbh, object)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
         detNormalizedImfileRow *object;
 
Index: trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- trunk/ippdb/tests/metadatafromobject.c	(revision 8325)
+++ trunk/ippdb/tests/metadatafromobject.c	(revision 8368)
@@ -1252,4 +1252,41 @@
     {
         psMetadata      *md;
+        detNormalizedStatImfileRow *object;
+        bool            status;
+
+        object = detNormalizedStatImfileRowAlloc(-32, -32, "a string", 32.32);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detNormalizedStatImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "norm") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
         detNormalizedImfileRow *object;
         bool            status;
Index: trunk/ippdb/tests/objectfrommetadata.c
===================================================================
--- trunk/ippdb/tests/objectfrommetadata.c	(revision 8325)
+++ trunk/ippdb/tests/objectfrommetadata.c	(revision 8368)
@@ -1870,4 +1870,54 @@
     {
         psMetadata      *md;
+        detNormalizedStatImfileRow *object;
+
+        md = psMetadataAlloc();
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "norm", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        object = detNormalizedStatImfileObjectFromMetadata(md);
+        if (!object) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+
+        if (!object->det_id == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->norm == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        psMetadata      *md;
         detNormalizedImfileRow *object;
 
Index: trunk/ippdb/tests/pop.c
===================================================================
--- trunk/ippdb/tests/pop.c	(revision 8325)
+++ trunk/ippdb/tests/pop.c	(revision 8368)
@@ -574,4 +574,23 @@
         psS32           iteration;
         char            class_id[256];
+        psF32           norm;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedStatImfilePop(dbh, &det_id, &iteration, (char **)&class_id, &norm)) { 
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+        psS32           det_id;
+        psS32           iteration;
+        char            class_id[256];
         char            uri[256];
         char            recipe[256];
Index: trunk/ippdb/tests/popfits.c
===================================================================
--- trunk/ippdb/tests/popfits.c	(revision 8325)
+++ trunk/ippdb/tests/popfits.c	(revision 8368)
@@ -700,4 +700,30 @@
         }
 
+        if (!detNormalizedStatImfilePopFits(dbh, fits, 1)) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!psFitsClose(fits)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+        psFits          *fits;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        // allocate a temp
+        fits = psFitsOpen(TMP_FILENAME, "w");
+        if (!fits) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detNormalizedImfilePopFits(dbh, fits, 1)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/popobject.c
===================================================================
--- trunk/ippdb/tests/popobject.c	(revision 8325)
+++ trunk/ippdb/tests/popobject.c	(revision 8368)
@@ -475,4 +475,22 @@
     {
         psDB            *dbh;
+        detNormalizedStatImfileRow *object;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        object = detNormalizedStatImfilePopObject(dbh);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
         detNormalizedImfileRow *object;
 
Index: trunk/ippdb/tests/selectrowsfits.c
===================================================================
--- trunk/ippdb/tests/selectrowsfits.c	(revision 8325)
+++ trunk/ippdb/tests/selectrowsfits.c	(revision 8368)
@@ -593,4 +593,26 @@
         }
 
+        if (!detNormalizedStatImfileSelectRowsFits(dbh, fits, NULL, 1)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(fits);
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+        psFits          *fits;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        fits = psFitsOpen(TMP_FILENAME, "w");
+        if (!fits) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detNormalizedImfileSelectRowsFits(dbh, fits, NULL, 1)) {
             exit(EXIT_FAILURE);
