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 selenium import webdriver | |
import unittest | |
class HomePageTest(unittest.TestCase): | |
def setUp(self): | |
self.driver = webdriver.Firefox( | |
) | |
def test_home_page(self): | |
self.driver.get("http://127.0.0.1:8000/") |
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
GRAPHQL_JWT = { | |
#... | |
"JWT_ALLOW_ANY_CLASSES": [ | |
"graphql_auth.mutations.Register", | |
], | |
} |
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
mutation { | |
register( | |
email: "new_user@email.com", | |
username: "new_user", | |
password1: "123456", | |
password2: "123456", | |
) { | |
success, | |
errors, | |
token, |
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
mutation { | |
register( | |
email: "new_user@email.com", | |
username: "new_user", | |
password1: "supersecretpassword", | |
password2: "supersecretpassword", | |
) { | |
success, | |
errors, | |
token, |
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
query { | |
users (last: 1){ | |
edges { | |
node { | |
id, | |
username, | |
email, | |
isActive, | |
archived, | |
verified, |
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
INSTALLED_APPS = ( | |
... | |
'corsheaders', | |
... | |
) | |
MIDDLEWARE_CLASSES = ( | |
... | |
'corsheaders.middleware.CorsMiddleware', | |
'django.middleware.common.CommonMiddleware', |
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
INSTALLED_APPS = [ | |
# ... | |
'django_filters' | |
] |
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 __future__ import print_function | |
import random | |
character = ( | |
"Hero", | |
"Recruit", | |
"Invader", | |
"Commander", | |
"Children", | |
"Spies", |
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
import unittest | |
from generator import generator | |
def test_sample_single_word(): | |
l = ('test', 'a', 'word') | |
word = generator.sample(l) | |
assert word in l | |
def test_sample_multiple_words(): | |
l = ('test', 'multiple', 'words') |
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python application | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] |
OlderNewer