【问题标题】:Django BDD testing with aloe, get absolute URLDjango BDD用芦荟测试,获取绝对URL
【发布时间】:2015-09-09 15:33:47
【问题描述】:

我正在使用Django-Aloe 进行 BDD 测试, 为了使事情变得更快,测试在线程中运行,并且每个线程都有一个不同的端口。

我似乎找不到访问绝对 URL 的方法。

在生菜中我有这个:

from lettuce.django import django_url
world.browser.visit(django_url('home'))

here 所述,这将转换为http://localhost:8090/home/

现在在芦荟中,我可以在这个测试步骤中做些什么来获得绝对网址?

@step(r'I access the url "(.*)"')
def access_url(step, url):
    world.browser.visit(?????)

【问题讨论】:

    标签: python django lettuce


    【解决方案1】:

    我在 github 上打开了一张票,显然它已添加到最新版本中,关闭我的票后他们将其添加到 docs

    【讨论】:

      猜你喜欢
      • 2013-07-25
      • 1970-01-01
      • 1970-01-01
      • 2012-05-06
      • 1970-01-01
      • 2011-09-09
      • 2016-01-02
      • 1970-01-01
      相关资源
      最近更新 更多