Skip to content

Commit 7a90943

Browse files
committed
Cleaned up
1 parent 60492a5 commit 7a90943

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

domain_models/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def get(self, field_name, default=None):
193193
If the field does not exist, `AttributeError` is raised as well.
194194
195195
:param string field_name:
196-
:param mixed default:
196+
:param object default:
197197
"""
198198
try:
199199
field = self.__class__.__fields__[field_name]

tests/test_models.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class BaseModelsTests(unittest.TestCase):
3030

3131
def test_set_and_get_attrs(self):
3232
"""Test setting and getting of domain model attributes."""
33-
3433
class User(models.DomainModel):
3534
"""Test user domain model."""
3635

@@ -130,7 +129,6 @@ class Model(models.DomainModel):
130129

131130
def test_field_could_not_be_rebound_in_different_model(self):
132131
"""Test that field could not be rebound."""
133-
134132
class Model1(models.DomainModel):
135133
"""Test model."""
136134

@@ -159,7 +157,6 @@ class ModelSetterGetterTests(unittest.TestCase):
159157

160158
def test_get_method_on_undefined(self):
161159
"""Test method get of Model."""
162-
163160
class Model(models.DomainModel):
164161
"""Test model."""
165162
field = fields.Int()
@@ -213,7 +210,6 @@ class Model(models.DomainModel):
213210

214211
def test_get_method_on_bool(self):
215212
"""Test method get on Bool of Model."""
216-
217213
class Model(models.DomainModel):
218214
"""Test model."""
219215
field = fields.Bool()
@@ -426,7 +422,6 @@ class ModelReprTests(unittest.TestCase):
426422

427423
def test_repr(self):
428424
"""Test model __repr__()."""
429-
430425
class User(models.DomainModel):
431426
"""Test user domain model."""
432427

@@ -461,7 +456,6 @@ class ModelStrTests(unittest.TestCase):
461456

462457
def test_str_with_single_view_key(self):
463458
"""Test model __str__()."""
464-
465459
class User(models.DomainModel):
466460
"""Test user domain model."""
467461

@@ -495,7 +489,6 @@ class User(models.DomainModel):
495489

496490
def test_str_with_multiple_view_keys(self):
497491
"""Test model __str__()."""
498-
499492
class User(models.DomainModel):
500493
"""Test user domain model."""
501494

@@ -529,7 +522,6 @@ class User(models.DomainModel):
529522

530523
def test_str_without_view_key(self):
531524
"""Test model __str__()."""
532-
533525
class User(models.DomainModel):
534526
"""Test user domain model."""
535527

@@ -556,7 +548,6 @@ class ModelSlotsOptimizationTests(unittest.TestCase):
556548

557549
def test_model_slots(self):
558550
"""Test model slots optimization."""
559-
560551
class Model(models.DomainModel):
561552
"""Test model."""
562553

@@ -571,7 +562,6 @@ class Model(models.DomainModel):
571562

572563
def test_model_slots_disabling(self):
573564
"""Test disabling of model slots optimization."""
574-
575565
class Model(models.DomainModel):
576566
"""Test model."""
577567

@@ -591,7 +581,6 @@ class ModelsEqualityComparationsTests(unittest.TestCase):
591581

592582
def test_models_equal_single_key(self):
593583
"""Test models equality comparator based on unique key."""
594-
595584
class Model(models.DomainModel):
596585
"""Test domain model with single unique key."""
597586

@@ -609,7 +598,6 @@ class Model(models.DomainModel):
609598

610599
def test_models_not_equal_single_key(self):
611600
"""Test that models are not equal."""
612-
613601
class Model(models.DomainModel):
614602
"""Test domain model with single unique key."""
615603

@@ -627,7 +615,6 @@ class Model(models.DomainModel):
627615

628616
def test_models_equal_multiple_keys(self):
629617
"""Test models equality comparator based on unique key."""
630-
631618
class Model(models.DomainModel):
632619
"""Test domain model with multiple unique key."""
633620

@@ -648,7 +635,6 @@ class Model(models.DomainModel):
648635

649636
def test_models_not_equal_multiple_keys(self):
650637
"""Test that models are not equal."""
651-
652638
class Model(models.DomainModel):
653639
"""Test domain model with multiple unique key."""
654640

@@ -669,7 +655,6 @@ class Model(models.DomainModel):
669655

670656
def test_models_not_equal_multiple_keys_first_equal(self):
671657
"""Test that models are not equal."""
672-
673658
class Model(models.DomainModel):
674659
"""Test domain model with multiple unique key."""
675660

@@ -690,7 +675,6 @@ class Model(models.DomainModel):
690675

691676
def test_models_not_equal_different_classes(self):
692677
"""Test that models are not equal."""
693-
694678
class Model1(models.DomainModel):
695679
"""Test domain model with single unique key."""
696680

@@ -714,7 +698,6 @@ class Model2(models.DomainModel):
714698

715699
def test_models_not_equal_scalar_value(self):
716700
"""Test that model and scalar value are not equal."""
717-
718701
class Model(models.DomainModel):
719702
"""Test domain model with single unique key."""
720703

@@ -729,7 +712,6 @@ class Model(models.DomainModel):
729712

730713
def test_models_not_equal_unknown_unique_key(self):
731714
"""Test that models are not equal."""
732-
733715
class Model(models.DomainModel):
734716
"""Test domain model without unique key."""
735717

@@ -746,7 +728,6 @@ class Model(models.DomainModel):
746728

747729
def test_same_models_equal_unknown_unique_key(self):
748730
"""Test that models are not equal."""
749-
750731
class Model(models.DomainModel):
751732
"""Test domain model without unique key."""
752733

@@ -760,7 +741,6 @@ class Model(models.DomainModel):
760741

761742
def test_non_equal_models_in_set_single_key(self):
762743
"""Test that non-equal models work properly with sets."""
763-
764744
class Model(models.DomainModel):
765745
"""Test domain model with single unique key."""
766746

@@ -783,7 +763,6 @@ class Model(models.DomainModel):
783763

784764
def test_equal_models_in_set_single_key(self):
785765
"""Test that equal models work properly with sets."""
786-
787766
class Model(models.DomainModel):
788767
"""Test domain model with single unique key."""
789768

@@ -806,7 +785,6 @@ class Model(models.DomainModel):
806785

807786
def test_non_equal_models_in_set_multiple_keys(self):
808787
"""Test that non-equal models work properly with sets."""
809-
810788
class Model(models.DomainModel):
811789
"""Test domain model with multiple unique key."""
812790

@@ -833,7 +811,6 @@ class Model(models.DomainModel):
833811

834812
def test_equal_models_in_set_multiple_keys(self):
835813
"""Test that equal models work properly with sets."""
836-
837814
class Model(models.DomainModel):
838815
"""Test domain model with multiple unique key."""
839816

@@ -860,7 +837,6 @@ class Model(models.DomainModel):
860837

861838
def test_non_equal_models_in_set_without_unique_key(self):
862839
"""Test that non-equal models work properly with sets."""
863-
864840
class Model(models.DomainModel):
865841
"""Test domain model without unique key."""
866842

@@ -882,7 +858,6 @@ class Model(models.DomainModel):
882858

883859
def test_equal_models_in_set_without_unique_key(self):
884860
"""Test that equal models work properly with sets."""
885-
886861
class Model(models.DomainModel):
887862
"""Test domain model without unique key."""
888863

@@ -902,7 +877,6 @@ class Model(models.DomainModel):
902877

903878
def test_models_collection_extending(self):
904879
"""Test model's collection extending."""
905-
906880
class Credit(models.DomainModel):
907881
"""Test credit domain model."""
908882

0 commit comments

Comments
 (0)