Changeset 1877 in products


Ignore:
Timestamp:
Mar 10, 2010 7:28:40 PM (14 years ago)
Author:
mylan
Message:

Remove config module from tests, move all constants into testInstallation and testResponce modules

Location:
quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/base.py

    r1854 r1877  
    1414from Testing import ZopeTestCase as ztc 
    1515 
     16from Products.CMFCore.utils import getToolByName 
     17 
     18from Products.PloneTestCase.layer import onsetup 
    1619from Products.PloneTestCase import PloneTestCase as ptc 
    17 from Products.PloneTestCase.layer import onsetup 
     20from Products.PloneTestCase.PloneTestCase import portal_owner 
     21from Products.PloneTestCase.PloneTestCase import default_user 
     22from Products.PloneTestCase.PloneTestCase import default_password 
    1823 
    19 from Products.CMFCore.utils import getToolByName 
    20 from config import PROJECT_NAME 
     24from quintagroup.seoptimizer.config import * 
    2125 
    2226# When ZopeTestCase configures Zope, it will *not* auto-load products 
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testBugs.py

    r1834 r1877  
    11import urllib, re 
    22from cStringIO import StringIO 
    3 from base import getToolByName, FunctionalTestCase, newSecurityManager 
    4 from config import * 
     3from base import * 
    54 
    65class TestBugs(FunctionalTestCase): 
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testCanonicalURL.py

    r1856 r1877  
    99from quintagroup.canonicalpath.interfaces import ICanonicalPath 
    1010from quintagroup.seoptimizer.interfaces import ISEOCanonicalPath 
    11 from base import getToolByName, FunctionalTestCase, newSecurityManager 
    12 from config import * 
     11from base import * 
    1312 
    1413class TestCanonicalURL(FunctionalTestCase): 
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testExposeDCMetaTags.py

    r1876 r1877  
    11import re, string 
    22from DateTime import DateTime 
    3 from base import getToolByName, FunctionalTestCase, newSecurityManager 
    4 from config import * 
     3from base import * 
    54 
    65METATAG = '.*(<meta\s+(?:(?:name="%s"\s*)|(?:content="(?P<tagcontent>.*?)"\s*)){2}/>)' 
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testInstallation.py

    r1849 r1877  
    1010from quintagroup.seoptimizer.browser.interfaces import IPloneSEOLayer 
    1111 
    12 from base import getToolByName, FunctionalTestCase, TestCase, newSecurityManager 
    13 from config import * 
     12from base import * 
     13 
     14PROPS = {'stop_words': STOP_WORDS, 
     15         'fields': ['seo_title', 'seo_description', 'seo_keywords']} 
     16 
     17DEFAULT_METATAGS_ORDER = [ 
     18    'DC.contributors', 'DC.creator', 'DC.date.created', 
     19    'DC.date.modified','DC.description', 'DC.distribution', 
     20    'DC.format', 'DC.language', 'DC.publisher', 'DC.rights', 
     21    'DC.subject', 'DC.type', 'description', 'distribution', 
     22    'keywords', 'robots'] 
     23DEFAULT_METATAGS_ORDER.sort() 
     24 
     25SEO_CONTENT = ['File', 'Document', 'News Item'] 
     26CONTENTTYPES_WITH_SEOACTION = ['File', 'Document', 'News Item', 'Folder', 'Event'] 
     27CONTENTTYPES_WITH_SEOACTION.sort() 
    1428 
    1529 
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testMetaTagsDuplication.py

    r1834 r1877  
    11import re 
    2 from base import getToolByName, FunctionalTestCase, newSecurityManager 
    3 from config import * 
     2from base import * 
    43 
    54class TestMetaTagsDuplication(FunctionalTestCase): 
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testResponse.py

    r1834 r1877  
    11import urllib, re 
    22from cStringIO import StringIO 
    3 from base import getToolByName, FunctionalTestCase, newSecurityManager 
    4 from config import * 
     3from base import * 
     4 
     5CUSTOM_METATAGS = [{'meta_name'    : 'metatag1', 
     6                    'meta_content' : 'metatag1value'}, 
     7                   {'meta_name'    : 'metatag2', 
     8                    'meta_content' : 'metatag2value'}, 
     9                   {'meta_name'    : 'metatag3', 
     10                    'meta_content' : ''} 
     11                  ] 
     12 
     13VIEW_METATAGS = ['DC.creator', 'DC.format', 'DC.date.modified', 
     14    'DC.date.created', 'DC.type', 'DC.distribution', 'description', 
     15    'keywords', 'robots', 'distribution'] 
     16 
     17GLOBAL_CUSTOM_METATAGS = { 
     18    'default_custom_metatags':'metatag1|global_metatag1value\nmetatag4|global_metatag4value'} 
    519 
    620class TestResponse(FunctionalTestCase): 
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testUsageKeywords.py

    r1872 r1877  
    11import urllib, re 
    22from Acquisition import aq_inner 
    3 from base import getToolByName, FunctionalTestCase, newSecurityManager 
    4 from config import * 
     3from base import * 
    54 
    65KWSTMPL = '.*(<meta\s+(?:(?:name="keywords"\s*)|(?:content="%s"\s*)){2}/>)' 
Note: See TracChangeset for help on using the changeset viewer.