This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import math | |
import re | |
# dado um título e lista de listas no formato | |
# ('<variável>', '<tipo>', '<descricao>', '<fórmula>') | |
# pede-se qual variável calcular, pede os valores e dá o resultado | |
# qualquer valor vazio saida da função |
This file contains hidden or 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
vagrant@precise32:~$ /vagrant/bin/django loaddata /vagrant/src/fixtures/test.yaml | |
Problem installing fixture '/vagrant/src/fixtures/test.yaml': Traceback (most recent call last): | |
File "/vagrant/eggs/Django-1.4.10-py2.7.egg/django/core/management/commands/loaddata.py", line 196, in handle | |
obj.save(using=using) | |
File "/vagrant/eggs/Django-1.4.10-py2.7.egg/django/core/serializers/base.py", line 165, in save | |
models.Model.save_base(self.object, using=using, raw=True) | |
File "/vagrant/eggs/Django-1.4.10-py2.7.egg/django/db/models/base.py", line 565, in save_base | |
created=(not record_exists), raw=raw, using=using) | |
File "/vagrant/eggs/Django-1.4.10-py2.7.egg/django/dispatch/dispatcher.py", line 172, in send | |
response = receiver(signal=self, sender=sender, **named) |
This file contains hidden or 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
vagrant@precise32:~$ /vagrant/bin/django test accounts.ChangeEmailEncryptDecryptTest.test_change_email | |
UserWarning: 'override_urls' is a deprecated method & will be removed by v1.0.0. Please use ``prepend_urls`` instead. [api.py:82] | |
Creating test database for alias 'default'... | |
E | |
====================================================================== | |
ERROR: test_change_email (accounts.tests.ChangeEmailEncryptDecryptTest) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/vagrant/src/accounts/tests.py", line 373, in setUp | |
super(ChangeEmailEncryptDecryptTest, self).setUp() |
This file contains hidden or 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
def create_admin_group_to_room(sender, **kwargs): | |
if not kwargs.get('created'): | |
return # don't do anything | |
room = kwargs.get('instance') | |
admin_group = Group(room=room, title='Admin', group_color='#ff0000') | |
admin_group.save() | |
logger.warning('Successfully created Admin group in Room: {0}'.format(room.name)) | |
This file contains hidden or 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
mac:onlinebr mario$ git branch | |
1.3.0pt | |
* 1.3.0pt-sprint-1 | |
1.3.1-sprint-2 | |
develop | |
mac:onlinebr mario$ git pull origin develop | |
Username for 'https://github.com': macndesign | |
Password for 'https://[email protected]': | |
From https://github.com/agilentia/onlinebr | |
* branch develop -> FETCH_HEAD |
This file contains hidden or 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
# language: pt-br | |
Funcionalidade: Log in no admin do django | |
Cenário: Login no admin do django com usuário e senha corretos | |
Dado o usuário "admin" e a senha "admin" | |
Quando eu preencher o formulário de login e enviar os dados | |
Então devo ver na tela a mensagem "Encerrar sessão" | |
Cenário: Login no admin do django com usuário e senha incorretos | |
Dado o usuário "usuario_invalido" e a senha "senha_invalida" |
This file contains hidden or 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: Log in django admin | |
Scenario: Log in django admin with correct user and password | |
Given I have the user admin and password admin | |
When I fill the form and submit | |
Then I see the text "Encerrar sessão" | |
Scenario: Log in django admin with incorrect user and password | |
Given I have the user invald_admin and password invalid_password | |
When I fill the form and submit |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
#-------------------------------------------------------------- | |
# myposconfig.py - *Configuração após instalar Ubuntu 13.04 > | |
# Autor: Jhonathan Paulo Banczek | |
# 09-03-2014 - jhoonb.com | |
# Python 2.7 > | |
# - *configurações pessoais | |
#-------------------------------------------------------------- |
This file contains hidden or 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
# coding: utf-8 | |
from splinter import Browser | |
import unittest | |
class LoginAdminTestCase(unittest.TestCase): | |
""" | |
Simples teste usando: | |
* Unittest: https://docs.python.org/2/library/unittest.html | |
* Splinter: http://splinter.cobrateam.info/ |