history admin dropdown for admin
This commit is contained in:
@@ -14,7 +14,6 @@ from rest_framework import status
|
||||
from companies.factories import CompanyFactory
|
||||
from products.factories import ProductFactory, ActiveProductFactory
|
||||
from products.models import Product
|
||||
# from products.utils import find_related_products_v3
|
||||
|
||||
from core.factories import CustomUserFactory
|
||||
from core.utils import get_tokens_for_user
|
||||
@@ -1159,45 +1158,6 @@ class AdminProductViewSetTest(APITestCase):
|
||||
self.assertEquals(response.status_code, 204)
|
||||
|
||||
|
||||
'''
|
||||
class FindRelatedProductsTest(APITestCase):
|
||||
|
||||
def setUp(self):
|
||||
"""Tests setup
|
||||
"""
|
||||
self.factory = ActiveProductFactory
|
||||
self.model = Product
|
||||
# clear table
|
||||
self.model.objects.all().delete()
|
||||
|
||||
def test_v3_find_by_tags(self):
|
||||
# create tagged product
|
||||
tag = 'cool'
|
||||
expected_instances = [
|
||||
self.factory(tags=tag),
|
||||
self.factory(tags=f'{tag} hat'),
|
||||
self.factory(tags=f'temperatures/{tag}'),
|
||||
self.factory(tags=f'temperatures/{tag}, body/hot'),
|
||||
self.factory(tags=f'temperatures/{tag}, hats/{tag}'),
|
||||
# multiple hits
|
||||
self.factory(tags=tag, attributes=tag),
|
||||
self.factory(tags=tag, attributes=tag, category=tag),
|
||||
self.factory(tags=tag, attributes=tag, category=tag, name=tag),
|
||||
self.factory(tags=tag, attributes=tag, category=tag, name=tag, description=tag),
|
||||
]
|
||||
|
||||
unexpected_instances = [
|
||||
self.factory(tags="notcool"), # shouldn't catch it
|
||||
self.factory(tags="azules"),
|
||||
]
|
||||
|
||||
# searh for it
|
||||
results = find_related_products_v3(tag)
|
||||
|
||||
# assert result
|
||||
self.assertTrue(len(results) == len(expected_instances))
|
||||
'''
|
||||
|
||||
class PurchaseEmailTest(APITestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user