Changeset 433 in main


Ignore:
Timestamp:
10/31/11 15:15:55 (8 years ago)
Author:
pcosquer
Message:

ajax: add tests

Location:
trunk/openPLM
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/plmapp/tests/__init__.py

    r403 r433  
    2727from openPLM.plmapp.tests.lifecycle import * 
    2828from openPLM.plmapp.tests.views import * 
     29from openPLM.plmapp.tests.ajax import * 
    2930from openPLM.plmapp.tests.csvimport import * 
    3031#from openPLM.plmapp.tests.closure import * 
  • trunk/openPLM/plmapp/tests/base.py

    r366 r433  
    11 
     2from django.core.files.base import ContentFile 
    23from django.contrib.auth.models import User 
    34from django.test import TestCase 
     
    3738        self.DATA["group"] = self.group 
    3839 
     40    def create(self, ref="Part1"): 
     41        return self.CONTROLLER.create(ref, self.TYPE, "a", self.user, self.DATA) 
     42 
     43    def get_file(self, name="temp.txt", data="data"): 
     44        f = ContentFile(data) 
     45        f.name = name 
     46        return f 
     47 
  • trunk/openPLM/plmapp/tests/controllers/document.py

    r431 r433  
    133133        self.old_files.append(d) 
    134134     
    135     def get_file(self, name="temp.txt", data="data"): 
    136         f = ContentFile(data) 
    137         f.name = name 
    138         return f 
    139  
    140135    def test_add_file(self): 
    141136        f = self.get_file() 
  • trunk/openPLM/plmapp/tests/controllers/plmobject.py

    r428 r433  
    4545    TYPE = "Part" 
    4646    DATA = {} 
    47  
    48  
    49     def create(self, ref="Part1"): 
    50         return self.CONTROLLER.create(ref, self.TYPE, "a", self.user, self.DATA) 
    5147 
    5248 
  • trunk/openPLM/settings_tests.py

    r428 r433  
    117117THUMBNAILS_DIR = os.path.join(MEDIA_ROOT, "thumbnails") 
    118118#: directory that stores thumbnails 
    119 THUMBNAILS_URL = MEDIA_URL + "thumbnails" 
     119THUMBNAILS_URL = MEDIA_URL + "thumbnails/" 
    120120 
    121121# Cookie used for session is temporary and is deleted when browser is closed 
Note: See TracChangeset for help on using the changeset viewer.