示例#1
0
文件: protocols.py 项目: Tythos/seres
	def test_end_to_end(self):
		d = get_all_dicts()
		c = Csv()
		text = c.outbound([d[0]])
		s = Sqlite()
		s.outbound(ru, text)
		r = s.inbound(ru)
示例#2
0
文件: protocols.py 项目: Tythos/seres
	def test_table_insert(self):
		s = Sqlite()
		c = Csv()
		d = get_all_dicts()
		text = c.outbound([d[0]])
		s.outbound(ru, text)
		conn = sqlite3.connect(ru.get_full_path())
		results = conn.execute("SELECT * FROM %s" % ru.frag)
		conn.close()
示例#3
0
文件: protocols.py 项目: Tythos/seres
	def test_table_create(self):
		d = get_all_dicts()
		conn = sqlite3.connect(ru.get_full_path())
		if Sqlite.is_table_exist(conn, ru.frag):
			conn.execute("DROP TABLE " + ru.frag)
		Sqlite.create_table_from_dataset(conn, ru.frag, [d[0]])
		conn.execute("DROP TABLE " + ru.frag)
		conn.commit()
		conn.close()
示例#4
0
文件: serial.py 项目: Tythos/seres
	def test_deserial(self):
		d = get_all_dicts()
		s = seres.serial.Serial()
		r = s.deserialize(d)
示例#5
0
文件: formats.py 项目: Tythos/seres
	def test_seres_dicts(self):
		p = seres.formats.Pickle()
		d0 = get_all_dicts()
		pt = p.outbound(d0)
		df = p.inbound(pt)
示例#6
0
文件: formats.py 项目: Tythos/seres
	def test_seres_dicts(self):
		j = seres.formats.Json()
		d0 = get_all_dicts()
		pt = j.outbound(d0)
		df = j.inbound(pt)
示例#7
0
文件: formats.py 项目: Tythos/seres
	def test_seres_dicts(self):
		cs = seres.formats.Csv()
		d0 = get_all_dicts()
		pt = cs.outbound(d0)
		df = cs.inbound(pt)