This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Division | |
In order to avoid silly mistakes | |
Cashiers must be able to calculate a fraction | |
Scenario: Regular numbers | |
Given I have entered 3 into the calculator | |
And I have entered 2 into the calculator | |
When I press divide | |
Then the result should be 1.5 on the screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from freshen import * | |
from freshen.checks import * | |
@After('@raises_exception') | |
def raises_exception(sc): | |
raise Exception('An error ocurred') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/> | |
<title>Lista de remédios</title> | |
</head> | |
<body id=""> | |
<ul> | |
{% for remedio in remedios %} | |
<li>{{ remedio.nome }}</li> | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Given('I have an attribute stored in world') | |
def i_have_an_attirbute_stored_in_world(step): | |
world._name = 'My name' # This line stores _name in world | |
world._name = 'His name' # This line raises an exception |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteCond $1 !^(index\.php|unit_test\.php|images|robots\.txt|static|.*\.css) | |
RewriteRule ^(.*)$ index.php/$1 [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block content %} | |
<p>Fill the form bellow to login in the system ;)</p> | |
{% if form.errors %} | |
<p>Your username and password didn't match. Please try again.</p> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block content %} | |
Bye :) | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block content %} | |
<form action="{% url core.views.new_post %}" method="post" accept-charset="utf-8"> | |
{% csrf_token %} | |
{{ form.as_p }} | |
<p><input type="submit" value="Post!"/></p> | |
</form> | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block content %} | |
<dl> | |
{% for post in posts %} | |
<dt>{{ post.title }} (written by {{ post.user.username }})</dt> | |
<dd>{{ post.content }}</dd> | |
{% endfor %} | |
</dl> | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{extend 'layout.html'}} | |
<h1 id="">Listing all posts</h1> | |
<dl> | |
{{for post in posts:}} | |
<dt>{{=post.title}} (written by {{=post.author.first_name}})</dt> | |
<dd>{{=post.content}}</dd> | |
{{pass}} | |
</dl> |
OlderNewer