Skip to content

Instantly share code, notes, and snippets.

View JoaquinAcuna97's full-sized avatar
🏠
Working from home

Joaquin Acuna JoaquinAcuna97

🏠
Working from home
View GitHub Profile
INSTALLED_APPS = [
# ...
'django_filters'
]
INSTALLED_APPS = (
...
'corsheaders',
...
)
MIDDLEWARE_CLASSES = (
...
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
query {
users (last: 1){
edges {
node {
id,
username,
email,
isActive,
archived,
verified,
mutation {
register(
email: "new_user@email.com",
username: "new_user",
password1: "supersecretpassword",
password2: "supersecretpassword",
) {
success,
errors,
token,
mutation {
register(
email: "new_user@email.com",
username: "new_user",
password1: "123456",
password2: "123456",
) {
success,
errors,
token,
GRAPHQL_JWT = {
#...
"JWT_ALLOW_ANY_CLASSES": [
"graphql_auth.mutations.Register",
],
}
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/")