summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-01-28 10:28:15 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:24 +0100
commit58acffc359b59c459c56ce4660fd656648ce3856 (patch)
treed71d64faba43c851ff7c0089731a7691163c3d42 /ishtar_common
parent835d8ab989ea5fc51451e3ec2fb109e7fc334a28 (diff)
downloadIshtar-58acffc359b59c459c56ce4660fd656648ce3856.tar.bz2
Ishtar-58acffc359b59c459c56ce4660fd656648ce3856.zip
Typo
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/tests.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 1b6889232..4356509e8 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -166,7 +166,7 @@ class UtilsTest(TestCase):
data_1 = {
'old':
{'youpi':
- {'plouf': u'tralalalère'}}
+ {'plouf': 'tralalalère'}}
}
data_2 = {
'tsoin_tsoin': 'hop',
@@ -177,7 +177,7 @@ class UtilsTest(TestCase):
'tsoin_tsoin': 'hop',
'old':
{'youpi':
- {'plouf': u'tralalalère'},
+ {'plouf': 'tralalalère'},
'hoppy': 'hop'}
}
res = update_data(data_1, data_2)
@@ -185,13 +185,13 @@ class UtilsTest(TestCase):
def test_move_dict_data(self):
data = {
- 'old': {u'daté': "value"}
+ 'old': {'daté': "value"}
}
expected = {
'old': {'date': "value"}
}
res = move_dict_data(
- data, u'data__old__daté', u"data__old__date")
+ data, 'data__old__daté', "data__old__date")
self.assertEqual(res, expected)
data = {
'': {'hop': "value"}
@@ -200,12 +200,12 @@ class UtilsTest(TestCase):
'hop': "value",
'': {}
}
- res = move_dict_data(data, u'data____hop', u"data__hop")
+ res = move_dict_data(data, 'data____hop', "data__hop")
self.assertEqual(res, expected)
data = {
'old': {
'traitement': {
- u'constat_état': 'aaa'
+ 'constat_état': 'aaa'
}
}
}
@@ -217,8 +217,8 @@ class UtilsTest(TestCase):
}
}
res = move_dict_data(data,
- u'data__old__traitement__constat_état',
- u'data__old__traitement__constat_etat')
+ 'data__old__traitement__constat_état',
+ 'data__old__traitement__constat_etat')
self.assertEqual(res, expected)
def test_tinyfy_url(self):
@@ -2136,7 +2136,7 @@ class ShortMenuTest(TestCase):
def _create_treatment(self):
from archaeological_finds.models import Treatment, TreatmentState
completed, created = TreatmentState.objects.get_or_create(
- txt_idx='completed', defaults={"executed": True, "label": u"Done"}
+ txt_idx='completed', defaults={"executed": True, "label": "Done"}
)
return Treatment.objects.create(
label="My treatment",
@@ -2291,12 +2291,12 @@ class ImportTest(TestCase):
models.OrganizationType)
# creation
- label = u"Ploufé"
+ label = "Ploufé"
ot = models.OrganizationType.objects.create(label=label)
self.assertEqual(models.ItemKey.objects.filter(
object_id=ot.pk, key=slugify(label),
content_type=content_type).count(), 1)
- label_2 = u"Plif"
+ label_2 = "Plif"
ot_2 = models.OrganizationType.objects.create(label=label_2)
self.assertEqual(models.ItemKey.objects.filter(
object_id=ot_2.pk, key=slugify(label_2),
@@ -2392,12 +2392,12 @@ class IshtarSiteProfileTest(TestCase):
def testExternalKey(self):
profile = models.get_current_profile()
p = models.Person.objects.create(name='plouf', surname=u'Tégada')
- self.assertEqual(p.raw_name, u"PLOUF Tégada")
- profile.person_raw_name = u'{surname|slug} {name}'
+ self.assertEqual(p.raw_name, "PLOUF Tégada")
+ profile.person_raw_name = '{surname|slug} {name}'
profile.save()
p.raw_name = ''
p.save()
- self.assertEqual(p.raw_name, u"tegada plouf")
+ self.assertEqual(p.raw_name, "tegada plouf")
class IshtarBasicTest(TestCase):
@@ -2610,8 +2610,8 @@ class CleanMedia(TestCase):
"hoplala_gvK3hAr_2m7zZPn_nKhh2S2.jpg",), # stop before because
# another file exists
]
- base_dir = os.sep.join([settings.ROOT_PATH, u"..", u"ishtar_common",
- u"tests", u"rename"])
+ base_dir = os.sep.join([settings.ROOT_PATH, "..", "ishtar_common",
+ "tests", "rename"])
for name, expected in test_names:
name = os.sep.join([base_dir, name])
new_name, modif = rename_and_simplify_media_name(name, rename=False)
@@ -2623,12 +2623,12 @@ class CleanMedia(TestCase):
def test_try_fix(self):
test_names = [
- (u"hoplala_gvK3hAr_2m7zZPn_nKhh2S2_ZwWMKBd_ZwWMKBd.jpg",
+ ("hoplala_gvK3hAr_2m7zZPn_nKhh2S2_ZwWMKBd_ZwWMKBd.jpg",
# non existing file
- u"hoplala_gvK3hAr_2m7zZPn.jpg",),
+ "hoplala_gvK3hAr_2m7zZPn.jpg",),
]
- base_dir = os.sep.join([settings.ROOT_PATH, u"..", u"ishtar_common",
- u"tests", u"rename"])
+ base_dir = os.sep.join([settings.ROOT_PATH, "..", "ishtar_common",
+ "tests", "rename"])
for name, expected in test_names:
name = os.sep.join([base_dir, name])
@@ -2650,7 +2650,7 @@ class PersonQATest(TestCase):
def test_bulk_update(self):
c = Client()
- pks = u"{}-{}".format(self.person_1.pk, self.person_2.pk)
+ pks = "{}-{}".format(self.person_1.pk, self.person_2.pk)
response = c.get(reverse('person-qa-bulk-update', args=[pks]))
self.assertRedirects(response, '/')