Skip to content

Commit

Permalink
flake8 and coverage source
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiusstrauss committed Aug 29, 2021
1 parent 4c5aa83 commit 64ca699
Show file tree
Hide file tree
Showing 21 changed files with 96 additions and 431 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ jobs:
- name: Run migrations
run: python3 manage.py migrate
run: |
python3 manage.py makemigrations
python3 manage.py migrate
- name: Lint with flake8
run: |
Expand All @@ -39,9 +41,6 @@ jobs:
coverage run manage.py test
coverage report
- name: Django tests
run: |
python3 manage.py test
13 changes: 7 additions & 6 deletions dessafio/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@

INSTALLED_APPS = DEFAULT_APPS + THIRD_PARTY_APPS + LOCAL_APPS

REST_FRAMEWORK = { 'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema' }
REST_FRAMEWORK = {
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema'}


MIDDLEWARE = [
Expand All @@ -77,9 +78,9 @@
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
'libraries' : {
'staticfiles': 'django.templatetags.static',
}
'libraries': {
'staticfiles': 'django.templatetags.static',
}
},
},
]
Expand All @@ -91,7 +92,7 @@
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases

DATABASES = {
'default': {
'default': {

'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
Expand Down Expand Up @@ -154,4 +155,4 @@
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
1 change: 0 additions & 1 deletion pytransfer/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
admin.site.register(Token)
admin.site.register(Balance)
admin.site.register(History)

4 changes: 2 additions & 2 deletions pytransfer/funcoes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def genBalanceRandom():

def randomchar(tamanho):
# funcao para dandomizar um char de tamanho definido
caracteres = '123456-78ABCDEFGHJK-MNPQRSTXabcdefghjkmnpqrstxz-'
caracteres = '123456-78ABCDEFGHJK-MNPQRSTXabcdefghjkmnpqrstxz-'
return ''.join(choice(caracteres) for _ in range(tamanho))


def getnewtoken():
return hashlib.sha1(
(randomchar(5) + randomchar(5)).encode('utf-8')
).hexdigest()

23 changes: 0 additions & 23 deletions pytransfer/migrations/0001_initial.py

This file was deleted.

28 changes: 0 additions & 28 deletions pytransfer/migrations/0002_pessoa.py

This file was deleted.

18 changes: 0 additions & 18 deletions pytransfer/migrations/0003_todo_senha.py

This file was deleted.

23 changes: 0 additions & 23 deletions pytransfer/migrations/0004_auto_20210806_0316.py

This file was deleted.

18 changes: 0 additions & 18 deletions pytransfer/migrations/0005_alter_pessoa_token.py

This file was deleted.

26 changes: 0 additions & 26 deletions pytransfer/migrations/0006_auto_20210806_0503.py

This file was deleted.

24 changes: 0 additions & 24 deletions pytransfer/migrations/0007_balance.py

This file was deleted.

42 changes: 0 additions & 42 deletions pytransfer/migrations/0008_auto_20210806_1055.py

This file was deleted.

18 changes: 0 additions & 18 deletions pytransfer/migrations/0009_alter_history_auth_token.py

This file was deleted.

25 changes: 0 additions & 25 deletions pytransfer/migrations/0010_auto_20210806_1102.py

This file was deleted.

36 changes: 0 additions & 36 deletions pytransfer/migrations/0011_auto_20210806_1214.py

This file was deleted.

18 changes: 0 additions & 18 deletions pytransfer/migrations/0012_history_cpf.py

This file was deleted.

Loading

0 comments on commit 64ca699

Please sign in to comment.