Esempio n. 1
0
 def test_three_relations(self):
     sql = chained_join(self.Catalog.category, self.Category.sub_category, self.SubCategory.product)
     assert str(sql) == (
         "category JOIN sub_category ON category._id = "
         "sub_category._category_id JOIN product ON sub_category._id = "
         "product._sub_category_id"
     )
 def test_three_relations(self, Catalog, Category, SubCategory):
     sql = chained_join(Catalog.category, Category.sub_category,
                        SubCategory.product)
     assert str(sql) == (
         'category JOIN sub_category ON category._id = '
         'sub_category._category_id JOIN product ON sub_category._id = '
         'product._sub_category_id')
 def test_two_relations(self, Catalog, Category):
     sql = chained_join(Catalog.categories, Category.sub_categories)
     assert str(sql) == (
         'catalog_category JOIN category ON category._id = '
         'catalog_category.category_id JOIN category_subcategory ON '
         'category._id = category_subcategory.category_id JOIN '
         'sub_category ON sub_category._id = '
         'category_subcategory.subcategory_id')
Esempio n. 4
0
 def test_two_relations(self):
     sql = chained_join(self.Catalog.categories, self.Category.sub_categories)
     assert str(sql) == (
         "catalog_category JOIN category ON category._id = "
         "catalog_category.category_id JOIN category_subcategory ON "
         "category._id = category_subcategory.category_id JOIN "
         "sub_category ON sub_category._id = "
         "category_subcategory.subcategory_id"
     )
 def test_two_relations(self, Catalog, Category):
     sql = chained_join(
         Catalog.category,
         Category.sub_category
     )
     assert str(sql) == (
         'category JOIN sub_category ON category._id = '
         'sub_category._category_id'
     )
 def test_three_relations(self, Catalog, Category, SubCategory):
     sql = chained_join(Catalog.categories, Category.sub_categories,
                        SubCategory.products)
     assert str(sql) == (
         'catalog_category JOIN category ON category._id = '
         'catalog_category.category_id JOIN category_subcategory ON '
         'category._id = category_subcategory.category_id JOIN sub_category'
         ' ON sub_category._id = category_subcategory.subcategory_id JOIN '
         'subcategory_product ON sub_category._id = '
         'subcategory_product.subcategory_id JOIN product ON product._id ='
         ' subcategory_product.product_id')
Esempio n. 7
0
 def test_three_relations(self):
     sql = chained_join(self.Catalog.categories, self.Category.sub_categories, self.SubCategory.products)
     assert str(sql) == (
         "catalog_category JOIN category ON category._id = "
         "catalog_category.category_id JOIN category_subcategory ON "
         "category._id = category_subcategory.category_id JOIN sub_category"
         " ON sub_category._id = category_subcategory.subcategory_id JOIN "
         "subcategory_product ON sub_category._id = "
         "subcategory_product.subcategory_id JOIN product ON product._id ="
         " subcategory_product.product_id"
     )
 def test_three_relations(self, Catalog, Category, SubCategory):
     sql = chained_join(
         Catalog.category,
         Category.sub_category,
         SubCategory.product
     )
     assert str(sql) == (
         'category JOIN sub_category ON category._id = '
         'sub_category._category_id JOIN product ON sub_category._id = '
         'product._sub_category_id'
     )
 def test_two_relations(self, Catalog, Category):
     sql = chained_join(
         Catalog.categories,
         Category.sub_categories
     )
     assert str(sql) == (
         'catalog_category JOIN category ON category._id = '
         'catalog_category.category_id JOIN category_subcategory ON '
         'category._id = category_subcategory.category_id JOIN '
         'sub_category ON sub_category._id = '
         'category_subcategory.subcategory_id'
     )
 def test_three_relations(self, Catalog, Category, SubCategory):
     sql = chained_join(
         Catalog.categories,
         Category.sub_categories,
         SubCategory.products
     )
     assert str(sql) == (
         'catalog_category JOIN category ON category._id = '
         'catalog_category.category_id JOIN category_subcategory ON '
         'category._id = category_subcategory.category_id JOIN sub_category'
         ' ON sub_category._id = category_subcategory.subcategory_id JOIN '
         'subcategory_product ON sub_category._id = '
         'subcategory_product.subcategory_id JOIN product ON product._id ='
         ' subcategory_product.product_id'
     )
Esempio n. 11
0
 def test_two_relations(self):
     sql = chained_join(self.Catalog.category, self.Category.sub_category)
     assert str(sql) == ("category JOIN sub_category ON category._id = " "sub_category._category_id")
Esempio n. 12
0
 def test_simple_join(self):
     assert str(chained_join(self.Catalog.category)) == "category"
 def test_simple_join(self, Catalog):
     assert str(chained_join(Catalog.categories)) == (
         'catalog_category JOIN category ON '
         'category._id = catalog_category.category_id'
     )
Esempio n. 14
0
 def test_two_relations(self, Catalog, Category):
     sql = chained_join(Catalog.category, Category.sub_category)
     assert str(sql) == ('category JOIN sub_category ON category._id = '
                         'sub_category._category_id')
Esempio n. 15
0
 def test_simple_join(self, Catalog):
     assert str(chained_join(Catalog.category)) == 'category'
 def test_two_relations(self):
     sql = chained_join(self.Catalog.categories,
                        self.Category.sub_categories)
     assert str(sql) == ('category JOIN sub_category ON category._id = '
                         'sub_category._category_id')
Esempio n. 17
0
 def test_simple_join(self, Catalog):
     assert str(chained_join(Catalog.categories)) == (
         'catalog_category JOIN category ON '
         'category._id = catalog_category.category_id')
 def test_simple_join(self, Catalog):
     assert str(chained_join(Catalog.category)) == 'category'
Esempio n. 19
0
 def test_simple_join(self):
     assert str(chained_join(self.Catalog.categories)) == (
         "catalog_category JOIN category ON " "category._id = catalog_category.category_id"
     )
 def test_simple_join(self):
     assert str(chained_join(self.Catalog.categories)) == 'category'