def test_list(self): call('touch orders_2014_03_18_13_58_39', shell=True) call('touch orders_2014_03_18_13_58_49', shell=True) expected = {1: 'orders_2014_03_18_13_58_39', 2: 'orders_2014_03_18_13_58_49'} self.assertEqual(expected, solution.list_order_files()) call('rm orders_*', shell=True)
def test_list(self): call('touch orders_2014_03_18_13_58_39', shell=True) call('touch orders_2014_03_18_13_58_49', shell=True) expected = { 1: 'orders_2014_03_18_13_58_39', 2: 'orders_2014_03_18_13_58_49' } self.assertEqual(expected, solution.list_order_files()) call('rm orders_*', shell=True)
def test_load(self): file = open('orders_2014_03_18_13_58_49', 'w') file.write('Az - 10.0') file.close() dict_of_orders = solution.list_order_files() orders = {} solution.load_orders(1, dict_of_orders, orders) self.assertEqual({'Az': 10.0}, orders) call('rm orders_2014_03_18_13_58_49', shell=True)