Beispiel #1
0
# -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012>  Gabriel Falcão <*****@*****.**>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
import commands
from lettuce.fs import FileSystem
from nose.tools import assert_equals
from tests.util import run_scenario

current_directory = FileSystem.dirname(__file__)


@FileSystem.in_directory(current_directory, 'django', 'rucola')
def test_harvest_uses_test_runner():
    'harvest uses LETTUCE_TEST_SERVER specified in settings'

    status, out = run_scenario()
    assert "Test Suite Summary:" in out
Beispiel #2
0
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
import os
import sys
import subprocess

from lettuce.fs import FileSystem
from tests.asserts import assert_not_equals

current_directory = FileSystem.dirname(__file__)
lib_directory = FileSystem.join(current_directory,  'lib')


OLD_PYTHONPATH = os.getenv('PYTHONPATH', ':'.join(sys.path))


def teardown():
    os.environ['PYTHONPATH'] = OLD_PYTHONPATH


@FileSystem.in_directory(current_directory, 'django', 'chive')
def test_django_admin_media_serving_on_django_13():
    'lettuce should serve admin static files properly on Django 1.3'

    os.environ['PYTHONPATH'] = "%s:%s" % (
Beispiel #3
0
def test_dirname():
    fs = FileSystem()
    p = fs.dirname(fs.abspath("."))
    p2 = dirname(abspath("."))

    assert p == p2, "Expected:\n%r\nGot:\n%r" % (p2, p)