-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a3cad7
commit c5e1db3
Showing
7 changed files
with
30 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
from tests.utils import connect_db_args, tube_db, v_db | ||
from tests.utils import connect_db_args, links_db, v_db | ||
from xklb.lb import library as lb | ||
|
||
|
||
def test_merge(temp_db): | ||
db1 = temp_db() | ||
lb(["merge-dbs", "--pk", "path", tube_db, v_db, db1]) | ||
lb(["merge-dbs", "--pk", "path", links_db, v_db, db1]) | ||
|
||
args = connect_db_args(db1) | ||
assert args.db.pop("SELECT COUNT(*) FROM media") == 6 | ||
assert args.db.pop("SELECT COUNT(*) FROM media") == 14 | ||
|
||
|
||
def test_split(temp_db): | ||
db1 = temp_db() | ||
lb(["merge-dbs", "--pk", "path", tube_db, v_db, db1, "-t", "media", "--where", 'path like "http%"']) | ||
lb(["merge-dbs", "--pk", "path", links_db, v_db, db1, "-t", "media", "--where", 'path like "http%"']) | ||
|
||
args = connect_db_args(db1) | ||
assert args.db.pop("SELECT COUNT(*) FROM media") == 2 | ||
assert args.db.pop("SELECT COUNT(*) FROM media") == 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "2.9.019" | ||
__version__ = "2.9.020" |