跳转到主要内容

一个连接到openstax/accounts的示例pyramid应用

项目描述

这是一个连接到openstax/accounts的示例python pyramid应用。

安装

  1. 安装 virtualenv

  2. virtualenv .

  3. ./bin/python setup.py install

  4. 设置openstax/services(参见karenc/openstax-setup)

  5. 将此应用注册到openstax/accounts

  6. 将development.ini.example复制到development.ini并更改值

  7. 通过 ./bin/pserve development.ini 启动应用

测试

  1. 将testing.ini复制到local_testing.ini并更改值。如果您打算针对openstax/accounts的本地实例运行功能测试,则此步骤是必要的。

    cp testing.ini.example local_testing.ini
  2. 下载chrome驱动器

    wget 'http://chromedriver.storage.googleapis.com/2.14/chromedriver_linux64.zip

    如果您没有chrome

    sudo apt-get install chromium-browser
  3. 解压chrome驱动器

    unzip chromedriver_linux64.zip
  4. 将chrome驱动器添加到 $PATH

    export PATH=$PATH:.
  5. 确保设置了 $DISPLAY,例如

    export DISPLAY=localhost:10.0

    或安装 xvfb

  6. 在没有openstax/accounts的情况下运行测试

    xvfb-run ./bin/python setup.py test

    或者运行所有测试(包括 LOCAL_INI,需要安装 openstax/accounts)

    LOCAL_INI=local_testing.ini xvfb-run ./bin/python setup.py test

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面