From 1c11833b81f82ee6eabf8e1055c2925535446a62 Mon Sep 17 00:00:00 2001 From: puhitaku Date: Wed, 13 Jan 2016 23:34:15 +0900 Subject: [PATCH] Add abstract object tests --- tests/test_abstract.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/test_abstract.py diff --git a/tests/test_abstract.py b/tests/test_abstract.py new file mode 100644 index 0000000..759d590 --- /dev/null +++ b/tests/test_abstract.py @@ -0,0 +1,16 @@ +""" +Test of bqx.abstract. + +Run Test: `tox` or `python setup.py test` +""" + +from bqx.abstract import Alias + + +def test_auto_alias(): + a_manual = Alias('real.alias').AS('alias') + a_auto = Alias('real.alias') + + assert a_manual.as_claus() == 'real.alias AS alias' + assert a_auto.as_claus(auto_alias=False) == 'real.alias' + assert a_auto.as_claus(auto_alias=True) == 'real.alias AS alias'