mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
use aurweb_test for default mysql dev database
This also updates `test/README.md` to be a bit more specific and precise with our current state of testing. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
55c0637b98
commit
8abb096d7b
4 changed files with 149 additions and 27 deletions
|
@ -119,9 +119,20 @@ def test_sqlalchemy_mysql_port_url():
|
|||
aurweb.config.rehash()
|
||||
|
||||
|
||||
def test_sqlalchemy_mysql_socket_url():
|
||||
tmpctx, tmp = make_temp_config("conf/config",
|
||||
(r"[;]?port = 3306", ";port = 3306"))
|
||||
|
||||
with tmpctx:
|
||||
with mock.patch.dict(os.environ, {"AUR_CONFIG": tmp}):
|
||||
aurweb.config.rehash()
|
||||
assert db.get_sqlalchemy_url()
|
||||
aurweb.config.rehash()
|
||||
|
||||
|
||||
def test_sqlalchemy_unknown_backend():
|
||||
tmpctx, tmp = make_temp_config("conf/config",
|
||||
(r"backend = mysql", "backend = blah"))
|
||||
(r"backend = .+", "backend = blah"))
|
||||
|
||||
with tmpctx:
|
||||
with mock.patch.dict(os.environ, {"AUR_CONFIG": tmp}):
|
||||
|
@ -156,7 +167,7 @@ def test_connection_class_sqlite_without_fail():
|
|||
|
||||
def test_connection_class_unsupported_backend():
|
||||
tmpctx, tmp = make_temp_config("conf/config",
|
||||
(r"backend = mysql", "backend = blah"))
|
||||
(r"backend = .+", "backend = blah"))
|
||||
|
||||
with tmpctx:
|
||||
with mock.patch.dict(os.environ, {"AUR_CONFIG": tmp}):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue