First time here? Check out the FAQ!

Jacob Oscarson's profile - activity

2012-12-09 15:09:34 -0500 received badge Notable Question (source)
2012-07-25 17:19:24 -0500 received badge Popular Question (source)
2012-07-25 01:05:38 -0500 received badge Famous Question (source)
2012-06-26 00:57:36 -0500 received badge Famous Question (source)
2011-12-20 15:08:21 -0500 commented question Running Askbot test suites

I did get it to run a bit further, using this commit.

2011-12-20 10:13:03 -0500 answered a question Running Askbot test suites

I managed to get a test run that seems more promising by modifying the manage.py of the dummy project with the follow code after the import sections:

import sys, os
if 'DJANGO_SETTINGS_MODULE' not in os.environ:
    os.environ['DJANGO_SETTINGS_MODULE'] = 'dev.settings' # <-- name of my dummy project

if 'test' in sys.argv:
    sys.path.append('.')
    from dev import settings # <-- my dev project's settings module here
    settings.LIVESETTINGS_OPTIONS = {
        settings.SITE_ID: {'SETTINGS':
                {'EXTERNAL_KEYS': {
                    'RECAPTCHA_SECRET': 'xxx'
                    }
                 }
            }
    }

    from django.test.utils import setup_test_environment, teardown_test_environment
    setup_test_environment()
    if 'south' in settings.INSTALLED_APPS:
        from south.management.commands import patch_for_test_db_setup
        patch_for_test_db_setup()
    from django.db import connection
    connection.creation.create_test_db(1, True)

The test suites seems to be taking quite long time to run on my machine even with an sqlite3 :memory: database, but I suppose that's to be expected. I'll let it run through when I get time. It does seem to throw occasional failures, though.

SOUTH setup in test environments from my fork of django-pytest.

2011-12-20 09:42:42 -0500 received badge Editor (source)
2011-12-20 09:16:42 -0500 commented answer Running Askbot test suites

Sure, how can I send you the settings.py file? (Alternatively, I generated it with dummy values using askbot-setup, then set the db adapter to sqlite3 and db to :memory: by hand in the settings.py file. I made no other changes.)

2011-12-20 08:38:04 -0500 commented answer Running Askbot test suites

I've created a lab project (calling it 'dev' here) in my cloned directory. When running python dev/manage.py test askbot against that I get a long traceback ending like this: File "/Users/jacob/src/oss/askbot-dev/src/askbot/askbot/deps/livesettings/values.py", line 336, in _value raise SettingNotSet("Startup error, couldn't load %s.%s" %(self.group.key, self.key)) askbot.deps.livesettings.models.SettingNotSet: ("Startup error, couldn't load EXTERNAL_KEYS.RECAPTCHA_SECRET", None)

2011-12-20 08:34:20 -0500 commented answer Running Askbot test suites

This implies that you have created a project? (I have sources cloned in another directory than my project for experimentation)

2011-12-20 08:24:23 -0500 received badge Student (source)
2011-12-20 08:14:57 -0500 asked a question Running Askbot test suites

Hello,

I'm preparing some customizations that might go a bit deeper than skin customization. Therefore I'm investigating the tests found in askbot/tests. However, I don't find any obvious way to run them (I see there's a tox specification file in there, though). Are there descriptions somewhere on how to run them?

And if I get them running, how much of the test suites are expected to pass?

Edit: here's my settings.py:

## Django settings for ASKBOT enabled project.
import os.path
import logging
import sys
import askbot

#this line is added so that we can import pre-packaged askbot dependencies
sys.path.append(os.path.join(os.path.dirname(askbot.__file__), 'deps'))

DEBUG = False#set to True to enable debugging
TEMPLATE_DEBUG = False#keep false when debugging jinja2 templates
INTERNAL_IPS = ('127.0.0.1',)

ADMINS = (
    ('Your Name', 'your_email@domain.com'),
)

MANAGERS = ADMINS

DATABASE_ENGINE = 'django.db.backends.sqlite3' # only postgres (>8.3) and mysql are supported so far others have not been tested yet
DATABASE_NAME = ':memory:'             # Or path to database file if using sqlite3.
DATABASE_USER = ''             # Not used with sqlite3.
DATABASE_PASSWORD = ''         # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.

#outgoing mail server settings
SERVER_EMAIL = ''
DEFAULT_FROM_EMAIL = ''
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_SUBJECT_PREFIX = ''
EMAIL_HOST=''
EMAIL_PORT=''
EMAIL_USE_TLS=False
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

#incoming mail settings
#after filling out these settings - please
#go to the site's live settings and enable the feature
#"Email settings" -> "allow asking by email"
#
#   WARNING: command post_emailed_questions DELETES all
#            emails from the mailbox each time
#            do not use your personal mail box here!!!
#
IMAP_HOST = ''
IMAP_HOST_USER = ''
IMAP_HOST_PASSWORD = ''
IMAP_PORT = ''
IMAP_USE_TLS = False

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Chicago'

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
LANGUAGE_CODE = 'en'

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
ASKBOT_FILE_UPLOAD_DIR = os.path.join(os.path.dirname(__file__), 'askbot', 'upfiles')

PROJECT_ROOT = os.path.dirname(__file__)

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/admin/media/'

# Make up some unique string, and don't share it with anybody.
SECRET_KEY = 'sdljdfjkldsflsdjkhsjkldgjlsdgfs s '

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
    #below is askbot stuff for this tuple
    'askbot.skins.loaders.filesystem_load_template_source',
    #'django.template.loaders.eggs.load_template_source',
)


MIDDLEWARE_CLASSES = (
    #'django.middleware.gzip.GZipMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    #'django.middleware.cache.UpdateCacheMiddleware',
    'django.middleware.common.CommonMiddleware',
    #'django ...
(more)
2011-12-15 09:37:54 -0500 commented question Twitter authentication ends up on askbot.com site

I've tried it, the error is still there.

2011-12-15 08:33:28 -0500 asked a question Twitter authentication ends up on askbot.com site

I'm trying to enable Twitter sign in but get a weird behaviour: after signing in to twitter I get bounced to an askbot.com page describing a in intenal server error. The page on askbot.com has an URL along the lines of this:

http://askbot.org/account/signin/complete-oauth/?oauth_token=XXXXXXX

And the screen says this:

image description

Any clues, bug? configuration issue?