Skip to content

Commit 76bb9e7

Browse files
committed
update tests
1 parent bdb2fdc commit 76bb9e7

File tree

2 files changed

+57
-2
lines changed

2 files changed

+57
-2
lines changed

test/test_default.jl

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,34 @@ Faker.seed(1234)
133133
@test Faker.prefixe() == "Miss"
134134
@test Faker.simple_profile() == Dict("name"=>"Domingo","mail"=>"Durgan.Krystle@hotmail.com","username"=>"Kimbery29","birthdate"=>"2007-5-18","sex"=>"F","address"=>"8557 McDermott Shores West Alex, OR 96510-7890")
135135
@test Faker.job() == "Immigration officer"
136-
@test "$(Faker.profile())" == "Dict{String,Any}(\"username\"=>\"Howell.Dannie\",\"sex\"=>\"M\",\"address\"=>\"931 Grover Court Soilashire, WY 69092-3732\",\"name\"=>\"Marissa\",\"job\"=>\"Land/geomatics surveyor\",\"mail\"=>\"Blondell71@yahoo.com\",\"birthdate\"=>\"1984-12-1\",\"current_location\"=>(-1.49512, -5.98828),\"blood_group\"=>\"B-\",\"residence\"=>\"6427 Treutel Divide Tienfort, MT 97964-8925\",\"company\"=>\"Legros and Sons\",\"website\"=>\"http://ol.info/\")"
136+
a=Faker.profile()
137+
b= Dict("username"=>"Howell.Dannie",
138+
"sex"=>"M",
139+
"address"=>"931 Grover Court Soilashire, WY 69092-3732",
140+
"name"=>"Marissa",
141+
"job"=>"Land/geomatics surveyor",
142+
"mail"=>"Blondell71@yahoo.com",
143+
"birthdate"=>"1984-12-1",
144+
"current_location"=> (-1.4951171875, -5.98828125),
145+
"blood_group"=>"B-",
146+
"residence"=>"6427 Treutel Divide Tienfort, MT 97964-8925",
147+
"company"=>"Legros and Sons",
148+
"website"=>"http://ol.info/"
149+
)
150+
151+
@test a["username"]== b["username"]
152+
@test a["sex"]== b["sex"]
153+
@test a["address"]== b["address"]
154+
@test a["name"]== b["name"]
155+
@test a["job"]== b["job"]
156+
@test a["mail"]== b["mail"]
157+
@test a["birthdate"]== b["birthdate"]
158+
@test a["current_location"]== b["current_location"]
159+
@test a["blood_group"]== b["blood_group"]
160+
@test a["residence"]== b["residence"]
161+
@test a["company"]== b["company"]
162+
@test a["website"]== b["website"]
163+
137164
@test Faker.profile("username") == Dict{Any,Any}("username"=>"Olson.Willy")
138165
@test Faker.profile("username","blood_group")== Dict{Any,Any}("blood_group"=>"A-","username"=>"Ronda.Heller")
139166
@test Faker.simple_profile("birthdate","address","sex") == Dict{Any,Any}("birthdate"=>"1974-11-23","sex"=>"F","address"=>"16379 Quigley Ramp Smithamborough, OK 39559-7992")

test/test_es_mx.jl

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,35 @@ Faker.seed(1234)
133133
@test Faker.prefixe() == "Dr."
134134
@test Faker.simple_profile() == Dict("name"=>"Elizabeth","mail"=>"Omar23@hotmail.com","username"=>"Marcos29","birthdate"=>"2022-2-9","sex"=>"M","address"=>"Avenida Luis Alberto de los Santos 3 5ª Planta Cerritos, SON 34045")
135135
@test Faker.job() == "Administrador de alojamiento"
136-
@test "$(Faker.profile())" == "Dict{String,Any}(\"username\"=>\"Villegas.María Elena\",\"sex\"=>\"M\",\"address\"=>\"Huerta México 63143 Interior 080 Choix, COL 62719\",\"name\"=>\"Erika\",\"job\"=>\"Agrimensor, minero\",\"mail\"=>\"Rentería.Adriana@prodigy.net.mx\",\"birthdate\"=>\"2027-12-6\",\"current_location\"=>(-0.995117, 8.00781),\"blood_group\"=>\"AB-\",\"residence\"=>\"Barranco Querétaro 71590 Planta baja Nazareno Etla, TLA 69478\",\"company\"=>\"Morán y Trujillo S.R.L\",\"website\"=>\"http://www.neh.mx/\")"
136+
a= Faker.profile()
137+
b= Dict(
138+
"username" => "Villegas.María Elena",
139+
"sex" => "M",
140+
"address" => "Huerta México 63143 Interior 080 Choix, COL 62719",
141+
"name" => "Erika",
142+
"job" => "Agrimensor, minero",
143+
"mail" => "Rentería.Adriana@prodigy.net.mx",
144+
"birthdate" => "2027-12-6",
145+
"current_location" => (-0.9951171875, 8.0078125),
146+
"blood_group" => "AB-",
147+
"residence" => "Barranco Querétaro 71590 Planta baja Nazareno Etla, TLA 69478",
148+
"company" => "Morán y Trujillo S.R.L",
149+
"website" => "http://www.neh.mx/"
150+
)
151+
152+
@test a["username"]== b["username"]
153+
@test a["sex"]== b["sex"]
154+
@test a["address"]== b["address"]
155+
@test a["name"]== b["name"]
156+
@test a["job"]== b["job"]
157+
@test a["mail"]== b["mail"]
158+
@test a["birthdate"]== b["birthdate"]
159+
@test a["current_location"]== b["current_location"]
160+
@test a["blood_group"]== b["blood_group"]
161+
@test a["residence"]== b["residence"]
162+
@test a["company"]== b["company"]
163+
@test a["website"]== b["website"]
164+
137165
@test Faker.profile("username") == Dict{Any,Any}("username"=>"Delgado.Gerardo")
138166
@test Faker.profile("username","blood_group") == Dict{Any,Any}("blood_group"=>"AB+","username"=>"zRamos")
139167
@test Faker.simple_profile("birthdate","address","sex") == Dict{Any,Any}("birthdate"=>"2087-3-15","sex"=>"M","address"=>"Camino Luis Alberto Zárate S/N Int. 9 Bacalar, BCN 72662")

0 commit comments

Comments
 (0)