예제 #1
0
    def test_no_fields(self):
        """Ensure that render having can work with out any arguments."""
        from bigquery.query_builder \
            import _render_having

        result = _render_having(None)

        self.assertEqual(result, "")
예제 #2
0
    def test_mutliple_fields(self):
        """Ensure that render having works with multiple fields."""
        result = _render_having([
            {
                'field': 'bar',
                'type': 'STRING',
                'comparators': [
                    {'condition': '>=', 'negate': False, 'value': '1'}
                ]
            }
        ])

        self.assertEqual(result, "HAVING (bar >= STRING('1'))")
예제 #3
0
    def test_no_fields(self):
        """Ensure that render having can work with out any arguments."""
        result = _render_having(None)

        self.assertEqual(result, "")