~oly/scaffold/trunk

« back to all changes in this revision

Viewing changes to tests/test_builder.py

  • Committer: Oliver Marks
  • Date: 2016-09-18 16:32:41 UTC
  • Revision ID: oly@digitaloctave.com-20160918163241-1y6lhshwr3ucn2tz
python3 changes, fixes to tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# -*- coding: utf-8 -*-
3
3
import unittest
4
4
import os, sys, shutil
5
 
from StringIO import StringIO
 
5
from io import StringIO
6
6
sys.path.insert(0,os.path.abspath('../'))
7
7
from scaffold import web
8
8
from scaffold.builder.__main__ import main as builder_main
9
 
from test_data_setup import * 
 
9
from tests.test_data_setup import * 
10
10
 
11
11
 
12
12
class AttributeDict(dict): 
38
38
        #shutil.rmtree(path)
39
39
    
40
40
    def test_generate_new_project_in_current_path(self):
41
 
        path = '/tmp/example_project'
 
41
        path = os.path.abspath('./example_project')
42
42
        builder_main(AttributeDict({
43
43
            'cmd':'init',
44
44
            'verbose': False}))
45
 
        
46
 
        
 
45
 
47
46
        self.assertTrue(os.path.exists(path + '/site/static/css'))
48
47
        self.assertTrue(os.path.exists(path + '/debian/control'))
49
48
        self.assertTrue(os.path.exists(path + '/debian/rules'))