예제 #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
예제 #11
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)