示例#1
0
    def test_is_query_valid_raises_date_not_defined_error(self) -> None:
        self.mock_config['split'] = 'day'
        table = \
            CassandraTable(self.mock_config, self.keyspace) \
            .query('base', keyspace='mock_keyspace') \
            .id('mock_col1')

        with self.assertRaises(DateNotDefinedError):
            table._is_query_valid()
示例#2
0
 def test_is_query_valid(self) -> None:
     table = \
         CassandraTable(self.mock_config, self.keyspace) \
         .query(keyspace='mock_keyspace')
     is_valid = table._is_query_valid()
     self.assertTrue(is_valid)