示例#1
0
 def test_validate_contains_none(self, mock_conn):
     with mock.patch.dict('src.etl.rds.CONFIG', self.config):
         rds = RDS()
         with self.assertRaises(
                 ValidationException,
                 msg="Should throw exception on a variable that is None."):
             rds.validate_contains("Variable", None)
             mock_conn.assert_called_once()
示例#2
0
 def test_validate_contains_text(self, mock_conn):
     with mock.patch.dict('src.etl.rds.CONFIG', self.config):
         rds = RDS()
         rds.validate_contains("Variable", "Contains")
         mock_conn.assert_called_once()
         self.assertTrue(
             True,
             "Should not throw exception on a variable that contains text.")
示例#3
0
 def test_validate_contains_none(self):
     rds = RDS()
     with self.assertRaises(ValidationException, msg="Should throw exception on a variable that is None."):
         rds.validate_contains("Variable", None)
示例#4
0
 def test_validate_contains_text(self):
     rds = RDS()
     rds.validate_contains("Variable", "Contains")
     self.assertTrue(True, "Should not throw exception on a variable that contains text.")