@@ -0,0 +1,859 @@
+import unittest%0Aimport os%0Afrom datetime import date, timedelta%0Afrom rollcall.tests import helper%0Afrom rollcall.func_json import gen_dict, format_date%0A%0Aclass Testadd(unittest.TestCase):%0A    %22%22%22%0A    tests the gen_dict function in func_json module%0A    %22%22%22%0A    def setUp(self):%0A        pass%0A%0A    def test_gen_dict_length(self):%0A        json = gen_dict(date.today(), %5B0,1,2,3,4,5,6%5D, 1)%0A        self.assertEqual(len(json), 7)%0A        json = gen_dict(date.today(), %5B0,1,2,3,4,5,6%5D, 16)%0A        self.assertEqual(len(json), 16 * 7)%0A%0A    def test_gen_dict_keys(self):%0A        today = date.today()%0A        json = gen_dict(today, %5B0,1,2,3,4,5,6%5D, 1)%0A        for x in range(len(json)):%0A            current = today + timedelta(days=x)%0A            formatted = format_date(current)%0A            self.assertTrue(json.has_key(formatted))%0A%0A    def tearDown(self):%0A        pass%0A%0A

test gen_dict