예제 #1
0
파일: test.py 프로젝트: smo93/hackbulgaria
 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)
예제 #2
0
 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)
예제 #3
0
파일: test.py 프로젝트: smo93/hackbulgaria
    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)
예제 #4
0
    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)