def test_show_nested(self): os.chdir(os.path.join(self.base, 'packages', 'a')) capture = py.io.StdCaptureFD() management.run(['show']) out, _ = capture.done() assert out.read() == "<Alchemist 'a'>\n"
def test_db_flush_nested(self): os.chdir(os.path.join(self.base, 'packages', 'a')) capture = py.io.StdCaptureFD() management.run(['db', 'flush']) out, err = capture.done() text = strip_colors(err.read()) lines = [x.strip() for x in text.split('\n')] assert lines[0] == 'alchemist db flush a.b' assert lines[1] == 'alchemist db flush a'
def test_db_init_nested_name(self): os.chdir(os.path.join(self.base, 'packages', 'a')) capture = py.io.StdCaptureFD() management.run(['db', 'init', 'a']) out, err = capture.done() text = strip_colors(err.read()) lines = [x.strip() for x in text.split('\n')] assert lines[0] == 'alchemist db init a' assert len(lines) == 4