Exemple #1
0
    def test_query_attr_select(self):
        """Test query_attr_select"""

        ans = "i.\"andy\"::numeric As attr1, " \
              "i.\"jay_z\"::numeric As attr2, "

        ans_array = "i.\"_2013_dec\"::numeric As attr1, " \
                    "i.\"_2014_jan\"::numeric As attr2, " \
                    "i.\"_2014_feb\"::numeric As attr3, "

        self.assertEqual(pu.query_attr_select(self.params), ans)
        self.assertEqual(pu.query_attr_select(self.params_array), ans_array)
    def test_query_attr_select(self):
        """Test query_attr_select"""

        ans = "i.\"{attr1}\"::numeric As attr1, " \
              "i.\"{attr2}\"::numeric As attr2, "

        self.assertEqual(pu.query_attr_select(self.params), ans)
    def test_query_attr_select(self):
        """Test query_attr_select"""

        ans1 = ("i.\"andy\"::numeric As attr1, "
                "i.\"jay_z\"::numeric As attr2, ")

        ans2 = ("i.\"price\"::numeric As attr1, "
                "i.\"sq_meters\"::numeric As attr2, ")

        ans3 = ("i.\"sq_meters\"::numeric As attr1, "
                "i.\"price\"::numeric As attr2, ")

        ans_array = ("i.\"_2013_dec\"::numeric As attr1, "
                     "i.\"_2014_jan\"::numeric As attr2, "
                     "i.\"_2014_feb\"::numeric As attr3, ")

        self.assertEqual(pu.query_attr_select(self.params1), ans1)
        self.assertEqual(pu.query_attr_select(self.params2), ans2)
        self.assertEqual(pu.query_attr_select(self.params3), ans3)
        self.assertEqual(pu.query_attr_select(self.params_array), ans_array)
    def test_query_attr_select(self):
        """Test query_attr_select"""

        ans1 = ("i.\"andy\"::numeric As attr1, "
                "i.\"jay_z\"::numeric As attr2, ")

        ans2 = ("i.\"price\"::numeric As attr1, "
                "i.\"sq_meters\"::numeric As attr2, ")

        ans3 = ("i.\"sq_meters\"::numeric As attr1, "
                "i.\"price\"::numeric As attr2, ")

        ans_array = ("i.\"_2013_dec\"::numeric As attr1, "
                     "i.\"_2014_jan\"::numeric As attr2, "
                     "i.\"_2014_feb\"::numeric As attr3, ")

        self.assertEqual(pu.query_attr_select(self.params1), ans1)
        self.assertEqual(pu.query_attr_select(self.params2), ans2)
        self.assertEqual(pu.query_attr_select(self.params3), ans3)
        self.assertEqual(pu.query_attr_select(self.params_array), ans_array)
    def test_query_attr_select(self):
        """Test query_attr_select"""

        ans = 'i."{attr1}"::numeric As attr1, ' 'i."{attr2}"::numeric As attr2, '

        self.assertEqual(pu.query_attr_select(self.params), ans)