@@ -4453,13 +4453,13 @@ def test_prepopulated_fields(self):
4453
4453
# Main form ----------------------------------------------------------
4454
4454
self .selenium .find_element_by_id ('id_pubdate' ).send_keys ('2012-02-18' )
4455
4455
self .select_option ('#id_status' , 'option two' )
4456
- self .selenium .find_element_by_id ('id_name' ).send_keys (' this is the mAin nÀMë and it\' s awεšomeıııİ' )
4456
+ self .selenium .find_element_by_id ('id_name' ).send_keys (' the mAin nÀMë and it\' s awεšomeıııİ' )
4457
4457
slug1 = self .selenium .find_element_by_id ('id_slug1' ).get_attribute ('value' )
4458
4458
slug2 = self .selenium .find_element_by_id ('id_slug2' ).get_attribute ('value' )
4459
4459
slug3 = self .selenium .find_element_by_id ('id_slug3' ).get_attribute ('value' )
4460
- self .assertEqual (slug1 , 'main-name-and-its-awesomeiiii-2012-02-18' )
4461
- self .assertEqual (slug2 , 'option-two-main-name-and-its-awesomeiiii' )
4462
- self .assertEqual (slug3 , 'this-is- the-main-n\xe0 m\xeb -and-its-aw\u03b5 \u0161 ome\u0131 \u0131 \u0131 i' )
4460
+ self .assertEqual (slug1 , 'the- main-name-and-its-awesomeiiii-2012-02-18' )
4461
+ self .assertEqual (slug2 , 'option-two-the- main-name-and-its-awesomeiiii' )
4462
+ self .assertEqual (slug3 , 'the-main-n\xe0 m\xeb -and-its-aw\u03b5 \u0161 ome\u0131 \u0131 \u0131 i' )
4463
4463
4464
4464
# Stacked inlines ----------------------------------------------------
4465
4465
# Initial inline
@@ -4470,8 +4470,8 @@ def test_prepopulated_fields(self):
4470
4470
)
4471
4471
slug1 = self .selenium .find_element_by_id ('id_relatedprepopulated_set-0-slug1' ).get_attribute ('value' )
4472
4472
slug2 = self .selenium .find_element_by_id ('id_relatedprepopulated_set-0-slug2' ).get_attribute ('value' )
4473
- self .assertEqual (slug1 , 'here-stacked-inline-2011-12-17' )
4474
- self .assertEqual (slug2 , 'option-one-here-stacked-inline' )
4473
+ self .assertEqual (slug1 , 'here-is-a- stacked-inline-2011-12-17' )
4474
+ self .assertEqual (slug2 , 'option-one-here-is-a- stacked-inline' )
4475
4475
initial_select2_inputs = self .selenium .find_elements_by_class_name ('select2-selection' )
4476
4476
# Inline formsets have empty/invisible forms.
4477
4477
# Only the 4 visible select2 inputs are initialized.
@@ -4493,9 +4493,9 @@ def test_prepopulated_fields(self):
4493
4493
slug1 = self .selenium .find_element_by_id ('id_relatedprepopulated_set-1-slug1' ).get_attribute ('value' )
4494
4494
slug2 = self .selenium .find_element_by_id ('id_relatedprepopulated_set-1-slug2' ).get_attribute ('value' )
4495
4495
# 50 characters maximum for slug1 field
4496
- self .assertEqual (slug1 , 'now-you-have-another-stacked-inline-very-loooooooo ' )
4496
+ self .assertEqual (slug1 , 'now-you-have-another-stacked-inline-with-a- very-lo ' )
4497
4497
# 60 characters maximum for slug2 field
4498
- self .assertEqual (slug2 , 'option-two-now-you-have-another-stacked-inline-very-looooooo ' )
4498
+ self .assertEqual (slug2 , 'option-two-now-you-have-another-stacked-inline-with-a- very-l ' )
4499
4499
4500
4500
# Tabular inlines ----------------------------------------------------
4501
4501
# Initial inline
@@ -4506,8 +4506,8 @@ def test_prepopulated_fields(self):
4506
4506
)
4507
4507
slug1 = self .selenium .find_element_by_id ('id_relatedprepopulated_set-2-0-slug1' ).get_attribute ('value' )
4508
4508
slug2 = self .selenium .find_element_by_id ('id_relatedprepopulated_set-2-0-slug2' ).get_attribute ('value' )
4509
- self .assertEqual (slug1 , 'and-now-tabular-inline-1234-12-07' )
4510
- self .assertEqual (slug2 , 'option-two-and-now-tabular-inline' )
4509
+ self .assertEqual (slug1 , 'and-now-with-a- tabular-inline-1234-12-07' )
4510
+ self .assertEqual (slug2 , 'option-two-and-now-with-a- tabular-inline' )
4511
4511
4512
4512
# Add an inline
4513
4513
# Button may be outside the browser frame.
@@ -4521,12 +4521,12 @@ def test_prepopulated_fields(self):
4521
4521
self .selenium .find_element_by_id ('id_relatedprepopulated_set-2-1-pubdate' ).send_keys ('1981-08-22' )
4522
4522
self .select_option ('#id_relatedprepopulated_set-2-1-status' , 'option one' )
4523
4523
self .selenium .find_element_by_id ('id_relatedprepopulated_set-2-1-name' ).send_keys (
4524
- r'a tÃbűlaŘ inline with ignored ;"&*^\%$#@-/`~ characters'
4524
+ r'tÃbűlaŘ inline with ignored ;"&*^\%$#@-/`~ characters'
4525
4525
)
4526
4526
slug1 = self .selenium .find_element_by_id ('id_relatedprepopulated_set-2-1-slug1' ).get_attribute ('value' )
4527
4527
slug2 = self .selenium .find_element_by_id ('id_relatedprepopulated_set-2-1-slug2' ).get_attribute ('value' )
4528
- self .assertEqual (slug1 , 'tabular-inline-ignored-characters-1981-08-22' )
4529
- self .assertEqual (slug2 , 'option-one-tabular-inline-ignored-characters' )
4528
+ self .assertEqual (slug1 , 'tabular-inline-with- ignored-characters-1981-08-22' )
4529
+ self .assertEqual (slug2 , 'option-one-tabular-inline-with- ignored-characters' )
4530
4530
# Add an inline without an initial inline.
4531
4531
# The button is outside of the browser frame.
4532
4532
self .selenium .execute_script ("window.scrollTo(0, document.body.scrollHeight);" )
@@ -4540,42 +4540,42 @@ def test_prepopulated_fields(self):
4540
4540
self .selenium .find_element_by_xpath ('//input[@value="Save"]' ).click ()
4541
4541
self .assertEqual (MainPrepopulated .objects .all ().count (), 1 )
4542
4542
MainPrepopulated .objects .get (
4543
- name = ' this is the mAin nÀMë and it\' s awεšomeıııİ' ,
4543
+ name = ' the mAin nÀMë and it\' s awεšomeıııİ' ,
4544
4544
pubdate = '2012-02-18' ,
4545
4545
status = 'option two' ,
4546
- slug1 = 'main-name-and-its-awesomeiiii-2012-02-18' ,
4547
- slug2 = 'option-two-main-name-and-its-awesomeiiii' ,
4548
- slug3 = 'this-is- the-main-nàmë-and-its-awεšomeıııi' ,
4546
+ slug1 = 'the- main-name-and-its-awesomeiiii-2012-02-18' ,
4547
+ slug2 = 'option-two-the- main-name-and-its-awesomeiiii' ,
4548
+ slug3 = 'the-main-nàmë-and-its-awεšomeıııi' ,
4549
4549
)
4550
4550
self .assertEqual (RelatedPrepopulated .objects .all ().count (), 4 )
4551
4551
RelatedPrepopulated .objects .get (
4552
4552
name = ' here is a sŤāÇkeð inline ! ' ,
4553
4553
pubdate = '2011-12-17' ,
4554
4554
status = 'option one' ,
4555
- slug1 = 'here-stacked-inline-2011-12-17' ,
4556
- slug2 = 'option-one-here-stacked-inline' ,
4555
+ slug1 = 'here-is-a- stacked-inline-2011-12-17' ,
4556
+ slug2 = 'option-one-here-is-a- stacked-inline' ,
4557
4557
)
4558
4558
RelatedPrepopulated .objects .get (
4559
4559
# 75 characters in name field
4560
4560
name = ' now you haVe anöther sŤāÇkeð inline with a very ... loooooooooooooooooo' ,
4561
4561
pubdate = '1999-01-25' ,
4562
4562
status = 'option two' ,
4563
- slug1 = 'now-you-have-another-stacked-inline-very-loooooooo ' ,
4564
- slug2 = 'option-two-now-you-have-another-stacked-inline-very-looooooo ' ,
4563
+ slug1 = 'now-you-have-another-stacked-inline-with-a- very-lo ' ,
4564
+ slug2 = 'option-two-now-you-have-another-stacked-inline-with-a- very-l ' ,
4565
4565
)
4566
4566
RelatedPrepopulated .objects .get (
4567
4567
name = 'And now, with a tÃbűlaŘ inline !!!' ,
4568
4568
pubdate = '1234-12-07' ,
4569
4569
status = 'option two' ,
4570
- slug1 = 'and-now-tabular-inline-1234-12-07' ,
4571
- slug2 = 'option-two-and-now-tabular-inline' ,
4570
+ slug1 = 'and-now-with-a- tabular-inline-1234-12-07' ,
4571
+ slug2 = 'option-two-and-now-with-a- tabular-inline' ,
4572
4572
)
4573
4573
RelatedPrepopulated .objects .get (
4574
- name = r'a tÃbűlaŘ inline with ignored ;"&*^\%$#@-/`~ characters' ,
4574
+ name = r'tÃbűlaŘ inline with ignored ;"&*^\%$#@-/`~ characters' ,
4575
4575
pubdate = '1981-08-22' ,
4576
4576
status = 'option one' ,
4577
- slug1 = 'tabular-inline-ignored-characters-1981-08-22' ,
4578
- slug2 = 'option-one-tabular-inline-ignored-characters' ,
4577
+ slug1 = 'tabular-inline-with- ignored-characters-1981-08-22' ,
4578
+ slug2 = 'option-one-tabular-inline-with- ignored-characters' ,
4579
4579
)
4580
4580
4581
4581
def test_populate_existing_object (self ):
@@ -4601,8 +4601,8 @@ def test_populate_existing_object(self):
4601
4601
# The slugs got prepopulated since they were originally empty
4602
4602
slug1 = self .selenium .find_element_by_id ('id_slug1' ).get_attribute ('value' )
4603
4603
slug2 = self .selenium .find_element_by_id ('id_slug2' ).get_attribute ('value' )
4604
- self .assertEqual (slug1 , 'main-name-best-2012-02-18' )
4605
- self .assertEqual (slug2 , 'option-two-main-name-best' )
4604
+ self .assertEqual (slug1 , 'this-is-the- main-name-the -best-2012-02-18' )
4605
+ self .assertEqual (slug2 , 'option-two-this-is-the- main-name-the -best' )
4606
4606
4607
4607
# Save the object
4608
4608
with self .wait_page_loaded ():
@@ -4614,8 +4614,8 @@ def test_populate_existing_object(self):
4614
4614
# The slugs got prepopulated didn't change since they were originally not empty
4615
4615
slug1 = self .selenium .find_element_by_id ('id_slug1' ).get_attribute ('value' )
4616
4616
slug2 = self .selenium .find_element_by_id ('id_slug2' ).get_attribute ('value' )
4617
- self .assertEqual (slug1 , 'main-name-best-2012-02-18' )
4618
- self .assertEqual (slug2 , 'option-two-main-name-best' )
4617
+ self .assertEqual (slug1 , 'this-is-the- main-name-the -best-2012-02-18' )
4618
+ self .assertEqual (slug2 , 'option-two-this-is-the- main-name-the -best' )
4619
4619
4620
4620
def test_collapsible_fieldset (self ):
4621
4621
"""
0 commit comments