def test_main_match_cpu(self): input_data = {} input_data['proc_cpuinfo'] = CPUINFO_WRONG input_data['proc_meminfo'] = MEMINFO_CORRECT expected = {'errors': [ '1 CPU cores is below minimal requirement of 2', ]} self.assertEquals(expected, sat6_hw_reqs.main(input_data))
def test_main_match_ram_swap(self): input_data = {} input_data['proc_cpuinfo'] = CPUINFO_CORRECT input_data['proc_meminfo'] = MEMINFO_WRONG expected = {'errors': [ 'RAM size 2075004 kB is below minimal requirement of 12582912 kB', 'Swap size 1020116 kB is below minimal requirement of 4194304 kB', ]} self.assertEquals(expected, sat6_hw_reqs.main(input_data))
def test_main_match_cpu(self): input_data = {} input_data['proc_cpuinfo'] = CPUINFO_WRONG input_data['proc_meminfo'] = MEMINFO_CORRECT expected = { 'errors': [ '1 CPU cores is below minimal requirement of 2', ] } self.assertEquals(expected, sat6_hw_reqs.main(input_data))
def test_main_match_ram_swap(self): input_data = {} input_data['proc_cpuinfo'] = CPUINFO_CORRECT input_data['proc_meminfo'] = MEMINFO_WRONG expected = { 'errors': [ 'RAM size 2075004 kB is below minimal requirement of 12582912 kB', 'Swap size 1020116 kB is below minimal requirement of 4194304 kB', ] } self.assertEquals(expected, sat6_hw_reqs.main(input_data))
def test_main_nomatch(self): input_data = {} input_data['proc_cpuinfo'] = CPUINFO_CORRECT input_data['proc_meminfo'] = MEMINFO_CORRECT self.assertEquals(None, sat6_hw_reqs.main(input_data))