def test_jdk_arch_for_unknown_system(self, get_arch): get_arch.return_value = 'unknown' try: _required_jdk_arch() self.fail('Expected Exception was not raised') except Exception: pass
def test_jdk_arch_for_x64_system(self, get_arch): from fabtools.oracle_jdk import _required_jdk_arch get_arch.return_value = 'x86_64' self.assertEqual('x64', _required_jdk_arch())
def test_jdk_arch_for_32bit_system(self, get_arch): from fabtools.oracle_jdk import _required_jdk_arch for system_arch in ['i386', 'i486', 'i586', 'i686']: get_arch.return_value = system_arch self.assertEqual('i586', _required_jdk_arch())
def test_jdk_arch_for_x64_system(self, get_arch): get_arch.return_value = 'x86_64' self.assertEqual('x64', _required_jdk_arch())
def test_jdk_arch_for_32bit_system(self, get_arch): for system_arch in ['i386', 'i486', 'i586', 'i686']: get_arch.return_value = system_arch self.assertEqual('i586', _required_jdk_arch())