This commit is contained in:
1 parent
d92c7a1964
commit
31f94997d5
13 files changed
+255
-9
No files matched your search
@@ -169,6 +169,31 @@ class ImportSteamTests(unittest.TestCase):
|
||||
"SELECT appid FROM game_fts WHERE game_fts MATCH 'gamma*'")]
|
||||
self.assertEqual(hits, [300])
|
||||
|
||||
def test_incremental_adds_installed_apps_outside_cache(self):
|
||||
self._run({100: game_info("Old Name", review=80)}, lib_ids=[100])
|
||||
self._run(
|
||||
{
|
||||
100: game_info("Changed Name", review=99),
|
||||
300: game_info("Installed Only", review=70),
|
||||
},
|
||||
installed={
|
||||
100: {"name": "Old Name", "size_bytes": 1024,
|
||||
"last_played": "0", "library_path": self.root},
|
||||
300: {"name": "Installed Only", "size_bytes": 2048,
|
||||
"last_played": "0", "library_path": self.root},
|
||||
},
|
||||
incremental=True,
|
||||
lib_ids=[100],
|
||||
)
|
||||
con = db.connect(self.db_path)
|
||||
self.addCleanup(con.close)
|
||||
self.assertEqual(self._game(con, 100)["name"], "Old Name")
|
||||
self.assertEqual(con.execute(
|
||||
"SELECT installed FROM game_install WHERE appid=100").fetchone()["installed"], 1)
|
||||
self.assertEqual(self._game(con, 300)["name"], "Installed Only")
|
||||
self.assertEqual(con.execute(
|
||||
"SELECT installed FROM game_install WHERE appid=300").fetchone()["installed"], 1)
|
||||
|
||||
def test_full_import_preserves_personal_attributes_and_translations(self):
|
||||
con = self._run({100: game_info("Initial", review=80)})
|
||||
con.execute(
|
||||
|
||||
Reference in new issue
Block a user