cs-freshness-test: Add test case for ContentStore and Data freshness

Refs: #1383

Change-Id: I69bf06dbb42b39ea8929bbd87a08d6f2723caeb7
diff --git a/test_cs_freshness/test_cs_freshness.py b/test_cs_freshness/test_cs_freshness.py
new file mode 100644
index 0000000..f935f7a
--- /dev/null
+++ b/test_cs_freshness/test_cs_freshness.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python2
+# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+#
+# Copyright (C) 2014 University of Arizona
+# Author: Yi Huang <ltr120@email.arizona.edu>
+# See COPYING for copyright and distribution information.
+#
+
+import os
+import unittest
+import subprocess
+
+class test_cs_freshness(unittest.TestCase):
+    """Test case for testing ContentStore and Freshness"""
+
+    def setUp(self):
+        print "\nTesting ContentStore and Freshness"
+        print "**********************************"
+        os.chdir("test_cs_freshness")
+
+    def tearDown(self):
+        print "**********************************"
+        os.chdir("..")
+
+    def test_cs_freshness(self):
+        ret = subprocess.call(["./cs-freshness-test.sh"], shell=True)
+        print "Test script return value:", ret
+        errormsg = {
+            1 : "No data received for first interest",
+            2 : "No data received for second interest",
+            3 : "ndn-traffic-server should receive exact 1 interest",
+            4 : "Data received for third interest (expected no data received)",
+            5 : "No data received for fourth interest",
+        }
+        if (ret != 0):
+            self.fail(errormsg[ret])