mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-25 18:43:49 +02:00
Fix test failures
This commit is contained in:
parent
dee826c5e3
commit
7815d58c2c
7 changed files with 88 additions and 9 deletions
|
@ -53,7 +53,6 @@ urlpatterns = [
|
|||
name=views.ApplicationWizard.EDIT_URL_NAME,
|
||||
),
|
||||
path("health/", views.health),
|
||||
path("edit_profile/", views.edit_profile, name="edit-profile"),
|
||||
path("openid/", include("djangooidc.urls")),
|
||||
path("register/", include((application_urls, APPLICATION_NAMESPACE))),
|
||||
path("api/v1/available/<domain>", available, name="available"),
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
from .edit_profile import *
|
||||
from .application_wizard import *
|
||||
|
|
17
src/registrar/migrations/0012_delete_userprofile.py
Normal file
17
src/registrar/migrations/0012_delete_userprofile.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 4.1.6 on 2023-03-07 14:31
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("registrar", "0011_remove_domainapplication_security_email"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name="UserProfile",
|
||||
),
|
||||
]
|
68
src/registrar/migrations/0013_publiccontact_contact_user.py
Normal file
68
src/registrar/migrations/0013_publiccontact_contact_user.py
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Generated by Django 4.1.6 on 2023-03-07 14:31
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("registrar", "0012_delete_userprofile"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="PublicContact",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("created_at", models.DateTimeField(auto_now_add=True)),
|
||||
("updated_at", models.DateTimeField(auto_now=True)),
|
||||
(
|
||||
"contact_type",
|
||||
models.CharField(
|
||||
choices=[
|
||||
("registrant", "Registrant"),
|
||||
("administrative", "Administrative"),
|
||||
("technical", "Technical"),
|
||||
("security", "Security"),
|
||||
],
|
||||
max_length=14,
|
||||
),
|
||||
),
|
||||
("name", models.TextField()),
|
||||
("org", models.TextField(null=True)),
|
||||
("street1", models.TextField()),
|
||||
("street2", models.TextField(null=True)),
|
||||
("street3", models.TextField(null=True)),
|
||||
("city", models.TextField()),
|
||||
("sp", models.TextField()),
|
||||
("pc", models.TextField()),
|
||||
("cc", models.TextField()),
|
||||
("email", models.TextField()),
|
||||
("voice", models.TextField()),
|
||||
("fax", models.TextField(null=True)),
|
||||
("pw", models.TextField()),
|
||||
],
|
||||
options={
|
||||
"abstract": False,
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="contact",
|
||||
name="user",
|
||||
field=models.OneToOneField(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.SET_NULL,
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
]
|
|
@ -8,12 +8,13 @@ class PublicContact(TimeStampedModel):
|
|||
|
||||
class ContactTypeChoices(models.TextChoices):
|
||||
"""These are the types of contacts accepted by the registry."""
|
||||
|
||||
REGISTRANT = "registrant", "Registrant"
|
||||
ADMINISTRATIVE = "administrative", "Administrative"
|
||||
TECHNICAL = "technical", "Technical"
|
||||
SECURITY = "security", "Security"
|
||||
|
||||
contact_type = models.CharField(choices=ContactTypeChoices)
|
||||
contact_type = models.CharField(max_length=14, choices=ContactTypeChoices.choices)
|
||||
|
||||
# contact's full name
|
||||
name = models.TextField(null=False)
|
||||
|
|
|
@ -83,10 +83,6 @@ class LoggedInTests(TestWithUser):
|
|||
self.assertContains(response, self.user.last_name)
|
||||
self.assertContains(response, self.user.email)
|
||||
|
||||
def test_edit_profile(self):
|
||||
response = self.client.get("/edit_profile/")
|
||||
self.assertContains(response, "Display Name")
|
||||
|
||||
def test_application_form_view(self):
|
||||
response = self.client.get("/register/", follow=True)
|
||||
self.assertContains(
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from .application import *
|
||||
from .health import *
|
||||
from .index import *
|
||||
from .profile import *
|
||||
from .whoami import *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue