示例#1
0
 class SortKeyModel(Model):
     id = String()
     name = String()
示例#2
0
class FakeModel(Model):
    test = String()
    test2 = String()
示例#3
0
 def test_set(self):
     """it adds the SET attribute"""
     expression = EqualityExpression('=', String(), 'test')
     self.request.update_expression = Mock()
     self.request.set(expression)
     self.request.update_expression.assert_called_with('SET', expression)
示例#4
0
 class FakeModel(Model):
     __tablename__ = 'test'
     test1 = String()
     test2 = Number()
示例#5
0
class TestModel(Model):
    test = String()
示例#6
0
 def setUp(self):
     super(TestString, self).setUp()
     self.dt = String(column_name="test")
示例#7
0
 def setUp(self):
     self.dt = String(column_name="testcol")
示例#8
0
 class TestModel(Model):
     __tablename__ = "test"
     test1 = String()
     test2 = String()
示例#9
0
 def setUp(self):
     super(TestSet, self).setUp()
     self.dt = Set(String(), column_name="test")
示例#10
0
 def test_index(self):
     """it returns a new instance of the datatype passed with the column_name
     it sets _index on the returned datatype instance"""
     res = self.dt.index(0, String())
     assert isinstance(res, String)
     assert res._index == 0
 class TestModel(Model):
     __tablename__ = 'test'
     _id = String()
     test = String()
示例#12
0
 def setUp(self):
     self.dt = String()
     self.translator = BaseDatatypeTranslator(self.dt)
     self.translator.condition_type = 'S'
     self.decorator = SetTranslator(self.translator)
示例#13
0
 def setUp(self):
     self.dt = String()
     self.translator = BaseDatatypeTranslator(self.dt)
示例#14
0
 def setUp(self):
     self.dt = String()
     self.translator = StringTranslator(self.dt)