コード例 #1
0
 def test_bigger_than_max_length(self):
     with raises(AssertionError):
         assert_max_length(self.user, 'name', 21)
コード例 #2
0
 def test_non_nullable_column(self):
     with raises(AssertionError):
         assert_nullable(self.user, 'age')
コード例 #3
0
 def test_smaller_than_max_length(self):
     with raises(AssertionError):
         assert_max_length(self.user, 'name', 19)
コード例 #4
0
 def test_matching_exception(self):
     with raises(Exception):
         raise Exception()
     assert True
コード例 #5
0
 def test_non_matchin_exception(self):
     with pytest.raises(Exception):
         with raises(ValueError):
             raise Exception()
コード例 #6
0
ファイル: test_asserts.py プロジェクト: bjmc/sqlalchemy-utils
 def test_bigger_than_max_value(self):
     with raises(AssertionError):
         assert_max_value(self.user, 'age', 151)
     with raises(AssertionError):
         assert_max_value(self.user, 'age', 151)
コード例 #7
0
ファイル: test_asserts.py プロジェクト: bjmc/sqlalchemy-utils
 def test_bigger_than_max_length(self):
     with raises(AssertionError):
         assert_max_length(self.user, 'fav_numbers', 9)
     with raises(AssertionError):
         assert_max_length(self.user, 'fav_numbers', 9)
コード例 #8
0
 def test_non_nullable_column(self):
     with raises(AssertionError):
         assert_nullable(self.user, 'age')
     with raises(AssertionError):
         assert_nullable(self.user, 'age')
コード例 #9
0
ファイル: test_asserts.py プロジェクト: bjmc/sqlalchemy-utils
 def test_smaller_than_max_value(self):
     with raises(AssertionError):
         assert_max_value(self.user, 'age', 149)
     with raises(AssertionError):
         assert_max_value(self.user, 'age', 149)
コード例 #10
0
 def test_non_matchin_exception(self):
     with pytest.raises(Exception):
         with raises(ValueError):
             raise Exception()
コード例 #11
0
 def test_bigger_than_max_length(self):
     with raises(AssertionError):
         assert_max_length(self.user, 'fav_numbers', 9)
     with raises(AssertionError):
         assert_max_length(self.user, 'fav_numbers', 9)
コード例 #12
0
 def test_bigger_than_max_value(self):
     with raises(AssertionError):
         assert_max_value(self.user, 'age', 151)
     with raises(AssertionError):
         assert_max_value(self.user, 'age', 151)
コード例 #13
0
 def test_smaller_than_max_value(self):
     with raises(AssertionError):
         assert_max_value(self.user, 'age', 149)
     with raises(AssertionError):
         assert_max_value(self.user, 'age', 149)
コード例 #14
0
 def test_matching_exception(self):
     with raises(Exception):
         raise Exception()
     assert True
コード例 #15
0
 def test_bigger_than_max_length(self):
     with raises(AssertionError):
         assert_max_length(self.user, 'name', 21)
     with raises(AssertionError):
         assert_max_length(self.user, 'name', 21)
コード例 #16
0
 def test_smaller_than_max_length(self):
     with raises(AssertionError):
         assert_max_length(self.user, 'name', 19)
     with raises(AssertionError):
         assert_max_length(self.user, 'name', 19)