def test_package_collecting(self): # given dt = KeePassTestData() collector = InfoCollector(dt.APP_NAME, dt.execution_order) # when collector.collect() # then self.assertEqual(dt.APP_NAME, collector.get_app_name()) self.assertEqual(dt.WEB_SPACE_URL_1, collector.get_collectibles()['app_website']) self.assertEqual(dt.expected_win_ver, collector.get_collectibles()['win_ver']) self.assertEqual(dt.expected_win_date, collector.get_collectibles()['win_date']) self.assertEqual(dt.expected_win_size, collector.get_collectibles()['win_size']) self.assertIn(collector.get_collectibles()['win_exe'], dt.expected_win_exe_tuple)
def test_package_collecting_online(self): # given dt = TestDataOnline() collector = InfoCollector(dt.APP_NAME, dt.execution_order) # when collector.collect() # then self.assertEqual(dt.APP_NAME, collector.get_app_name()) self.assertEqual(dt.APP_WEBSITE, collector.get_collectibles()['app_website']) self.assertEqual(get_const_win_exe(), collector.get_collectibles()['const_win_exe']) self.assertEqual(dt.expected_win_ver, collector.get_collectibles()['Win_ver']) self.assertEqual(dt.expected_win_size, collector.get_collectibles()['Win_size']) self.assertEqual(dt.expected_win_date, collector.get_collectibles()['Win_date'])
def test_collect_1(self): # given data = InfoCollectorTestData() collector = InfoCollector(data.get_app_name(), data.get_execution_order()) # when collector.collect() # then self.assertEqual(data.get_app_name(), collector.get_app_name()) self.assertEqual(data.get_expected_collectibles(), collector.get_collectibles())
def test_package_collecting(self): # given dt = PotPlayerTestData() collector = InfoCollector(dt.APP_NAME, dt.execution_order) # when collector.collect() # then self.assertEqual(dt.APP_NAME, collector.get_app_name()) self.assertEqual(dt.WEB_SPACE_URL_1, collector.get_collectibles()['app_website']) self.assertEqual(dt.expected_win_exe_32, collector.get_collectibles()['win_exe_32bit']) self.assertEqual(dt.expected_win_exe_64, collector.get_collectibles()['win_exe_64bit']) self.assertEqual(dt.expected_win_beta_exe, collector.get_collectibles()['win_beta_exe']) self.assertEqual(dt.expected_win_beta_ver, collector.get_collectibles()['win_beta_ver']) self.assertEqual(dt.expected_win_ver, collector.get_collectibles()['win_ver']) self.assertEqual(dt.expected_win_date, collector.get_collectibles()['win_date']) self.assertEqual(dt.expected_win_size, collector.get_collectibles()['win_size'])
def test_package_collecting_online(self): # given dt = TestDataOnline() collector = InfoCollector(dt.APP_NAME, dt.execution_order) # when collector.collect() # then self.assertEqual(dt.APP_NAME, collector.get_app_name()) self.assertIn(collector.get_collectibles()['link_1'], dt.expected_links) self.assertIn(collector.get_collectibles()['link_2'], dt.expected_links) self.assertIn(collector.get_collectibles()['link_3'], dt.expected_links) self.assertEqual(get_google_play_apk(), collector.get_collectibles()['google_play_apk']) self.assertEqual(dt.expected_apk_date, collector.get_collectibles()['apk_date']) self.assertEqual(dt.expected_apk_size, collector.get_collectibles()['apk_size']) self.assertEqual(dt.expected_apk_ver, collector.get_collectibles()['apk_ver']) self.assertEqual(dt.expected_win_ver, collector.get_collectibles()['Win_ver']) self.assertEqual(dt.expected_win_date, collector.get_collectibles()['Win_date']) self.assertEqual(dt.expected_win_size, collector.get_collectibles()['Win_size']) self.assertEqual(dt.expected_mac_ver, collector.get_collectibles()['Mac_ver']) self.assertEqual(dt.expected_mac_date, collector.get_collectibles()['Mac_date']) self.assertEqual(dt.expected_mac_size, collector.get_collectibles()['Mac_size']) self.assertEqual(get_ms_store_link(), collector.get_collectibles()['ms_store_link']) self.assertEqual(dt.expected_ms_store_size, collector.get_collectibles()['ms_store_size']) self.assertEqual(SteamTestData.WEB_SPACE_URL_1, collector.get_collectibles()['app_website'])
def test_package_collecting(self): # given dt = IrfanViewTestData() collector = InfoCollector(dt.APP_NAME, dt.execution_order) # when collector.collect() # then self.assertEqual(dt.APP_NAME, collector.get_app_name()) self.assertEqual(dt.WEB_SPACE_URL_1, collector.get_collectibles()['app_website']) self.assertEqual(dt.expected_win_exe_64, collector.get_collectibles()['win_exe_64']) self.assertEqual(dt.expected_win_zip_64, collector.get_collectibles()['win_zip_64']) self.assertEqual(dt.expected_win_exe_64_de, collector.get_collectibles()['win_exe_64_de']) self.assertEqual(dt.expected_win_zip_64_de, collector.get_collectibles()['win_zip_64_de']) self.assertEqual(dt.expected_win_exe_64_plugins, collector.get_collectibles()['win_exe_64_plugins']) self.assertEqual(dt.expected_win_zip_64_plugins, collector.get_collectibles()['win_zip_64_plugins']) self.assertEqual(dt.expected_win_exe_64_ver, collector.get_collectibles()['win_exe_64_ver']) self.assertEqual(dt.expected_win_exe_64_size, collector.get_collectibles()['win_exe_64_size']) self.assertEqual(dt.expected_win_exe_64_hash, collector.get_collectibles()['win_exe_64_hash']) self.assertEqual(dt.expected_win_zip_64_ver, collector.get_collectibles()['win_zip_64_ver']) self.assertEqual(dt.expected_win_zip_64_size, collector.get_collectibles()['win_zip_64_size']) self.assertEqual(dt.expected_win_zip_64_hash, collector.get_collectibles()['win_zip_64_hash']) self.assertEqual(dt.expected_win_exe_64_de_ver, collector.get_collectibles()['win_exe_64_de_ver']) self.assertEqual(dt.expected_win_exe_64_de_size, collector.get_collectibles()['win_exe_64_de_size']) self.assertEqual(dt.expected_win_exe_64_de_hash, collector.get_collectibles()['win_exe_64_de_hash']) self.assertEqual(dt.expected_win_zip_64_de_ver, collector.get_collectibles()['win_zip_64_de_ver']) self.assertEqual(dt.expected_win_zip_64_de_size, collector.get_collectibles()['win_zip_64_de_size']) self.assertEqual(dt.expected_win_zip_64_de_hash, collector.get_collectibles()['win_zip_64_de_hash']) self.assertEqual( dt.expected_win_exe_64_plugins_ver, collector.get_collectibles()['win_exe_64_plugins_ver']) self.assertEqual( dt.expected_win_exe_64_plugins_size, collector.get_collectibles()['win_exe_64_plugins_size']) self.assertEqual( dt.expected_win_exe_64_plugins_hash, collector.get_collectibles()['win_exe_64_plugins_hash']) self.assertEqual( dt.expected_win_zip_64_plugins_ver, collector.get_collectibles()['win_zip_64_plugins_ver']) self.assertEqual( dt.expected_win_zip_64_plugins_size, collector.get_collectibles()['win_zip_64_plugins_size']) self.assertEqual( dt.expected_win_zip_64_plugins_hash, collector.get_collectibles()['win_zip_64_plugins_hash']) self.assertEqual(dt.expected_win_exe_32_hash, collector.get_collectibles()['win_exe_32_hash']) self.assertEqual(dt.expected_win_zip_32_hash, collector.get_collectibles()['win_zip_32_hash']) self.assertEqual(dt.expected_win_exe_32_de_hash, collector.get_collectibles()['win_exe_32_de_hash']) self.assertEqual(dt.expected_win_zip_32_de_hash, collector.get_collectibles()['win_zip_32_de_hash']) self.assertEqual(dt.expected_win_exe_32, collector.get_collectibles()['win_exe_32']) self.assertEqual(dt.expected_ms_store_size, collector.get_collectibles()['ms_store_size']) self.assertEqual(dt.WEB_SPACE_URL_4, collector.get_collectibles()['ms_store_page']) self.assertEqual(dt.expected_win_ver, collector.get_collectibles()['win_ver']) self.assertEqual(dt.expected_win_date, collector.get_collectibles()['win_date']) self.assertEqual(dt.expected_win_size, collector.get_collectibles()['win_size'])
def test_package_collecting(self): # given dt = GoogleChromeTestData() collector = InfoCollector(dt.APP_NAME, dt.execution_order) # when collector.collect() # then self.assertEqual(dt.APP_NAME, collector.get_app_name()) self.assertEqual(dt.APP_WEBSITE, collector.get_collectibles()['app_website']) self.assertEqual(get_win_exe_64bit(), collector.get_collectibles()['win_exe_64bit']) self.assertEqual(get_win_exe_32bit(), collector.get_collectibles()['win_exe_32bit']) self.assertEqual(get_mac_dmg_1010plus(), collector.get_collectibles()['mac_dmg_10.10+']) self.assertEqual(get_win_xp_exe(), collector.get_collectibles()['win_xp_exe']) self.assertEqual(get_win_vista_exe(), collector.get_collectibles()['win_vista_exe']) self.assertEqual(get_mac_dmg_106_108(), collector.get_collectibles()['mac_dmg_10.6-10.8']) self.assertEqual(get_mac_dmg_109(), collector.get_collectibles()['mac_dmg_10.9']) self.assertEqual(get_linux_deb(), collector.get_collectibles()['linux_deb']) self.assertEqual(get_linux_rpm(), collector.get_collectibles()['linux_rpm']) self.assertEqual(dt.WEB_SPACE_URL_2, collector.get_collectibles()['google_play_apk']) self.assertEqual(dt.expected_apk_date, collector.get_collectibles()['apk_date']) self.assertEqual(str(), collector.get_collectibles()['_gp_size']) self.assertEqual(str(), collector.get_collectibles()['_gp_ver']) self.assertEqual(dt.expected_win_ver, collector.get_collectibles()['Win_ver']) self.assertEqual(dt.expected_win_date, collector.get_collectibles()['Win_date']) self.assertEqual(str(), collector.get_collectibles()['_size']) self.assertEqual(dt.expected_mac_ver, collector.get_collectibles()['Mac_ver']) self.assertEqual(dt.expected_mac_date, collector.get_collectibles()['Mac_date']) self.assertEqual(dt.expected_mac_size, collector.get_collectibles()['Mac_size']) self.assertEqual(dt.expected_ios_ver, collector.get_collectibles()['ios_ver']) self.assertEqual(dt.expected_ios_size, collector.get_collectibles()['ios_size']) self.assertEqual(dt.WEB_SPACE_URL_5, collector.get_collectibles()['ios_itunes'])
def test_package_collecting(self): # given dt = SumatraPdfTestData() collector = InfoCollector(dt.APP_NAME, dt.execution_order) # when collector.collect() # then self.assertEqual(dt.APP_NAME, collector.get_app_name()) self.assertEqual(dt.WEB_SPACE_URL_1, collector.get_collectibles()['app_website']) self.assertEqual(dt.expected_ms_store_size, collector.get_collectibles()['ms_store_size']) self.assertEqual(dt.WEB_SPACE_URL_2, collector.get_collectibles()['ms_store_link']) self.assertEqual(dt.expected_win_ver, collector.get_collectibles()['win_ver']) self.assertEqual(dt.expected_win_date, collector.get_collectibles()['win_date']) self.assertEqual(dt.expected_win_size, collector.get_collectibles()['win_size']) self.assertEqual(dt.expected_win_exe_32bit, collector.get_collectibles()['win_exe_32bit']) self.assertEqual(dt.expected_win_exe_64bit, collector.get_collectibles()['win_exe_64bit']) self.assertEqual(dt.expected_win_zip_32bit, collector.get_collectibles()['win_zip_32bit']) self.assertEqual(dt.expected_win_zip_64bit, collector.get_collectibles()['win_zip_64bit']) self.assertIn(collector.get_collectibles()['win_exe_mg1'], dt.expected_win_exe_tuple) self.assertIn(collector.get_collectibles()['win_exe_mg2'], dt.expected_win_exe_tuple)
def test_online_collecting(self): # given dt = GOGGalaxyTestData() dt.execution_order.list[0].html_data = fetch_html(dt.WEB_SPACE_URL_1) dt.execution_order.list[1].html_data = fetch_html(dt.WEB_SPACE_URL_2) collector = InfoCollector(dt.APP_NAME, dt.execution_order) # when collector.collect() # then self.assertEqual(dt.APP_NAME, collector.get_app_name()) self.assertEqual(dt.expected_mac_pkg, collector.get_collectibles()['Mac_pkg']) self.assertEqual(dt.expected_mac_ver, collector.get_collectibles()['Mac_ver']) self.assertEqual(dt.expected_windows_exe, collector.get_collectibles()['Windows_exe']) self.assertEqual(dt.expected_windows_ver, collector.get_collectibles()['Windows_ver']) self.assertEqual(dt.expected_date_published, collector.get_collectibles()['date_published']) self.assertEqual(dt.expected_file_size, collector.get_collectibles()['file_size']) self.assertEqual(dt.WEB_SPACE_URL_1, collector.get_collectibles()['app_website'])