gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[robocop] 08/37: Add more tests


From: Admin
Subject: [robocop] 08/37: Add more tests
Date: Thu, 05 Jun 2025 10:20:53 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository robocop.

commit ff9c8dd00275f9db4ca2d6d172279855ed0c66b0
Author: Gust Leenaars <gl.nlnet@leenaa.rs>
AuthorDate: Mon May 5 11:51:34 2025 +0200

    Add more tests
---
 test/Tests/Check.hs        |  34 +++++----
 test/Tests/Targets/Real.hs | 180 +++++++++++++++++++++++++++++++++++++++++++--
 test/data/target_68815.xml |  31 ++++++++
 3 files changed, 226 insertions(+), 19 deletions(-)

diff --git a/test/Tests/Check.hs b/test/Tests/Check.hs
index 9323207..72e0007 100644
--- a/test/Tests/Check.hs
+++ b/test/Tests/Check.hs
@@ -119,19 +119,27 @@ personTests :: Map Int Individual -> TestTree
 personTests sanction_list =
   testGroup "Individuals"
     [ testGroup "Known Sanctioned"
-       {- testTarget False SSID  target_SSID  sanction_list $ distribution 
ADDRESS DATE ID  NAME NATIONALITY CONFIDENCE
-                                                              MAX_SCORE    150 
    100  200 125  50          0.75       -}
-        [ testTarget False 5144  target_5144  sanction_list $ distribution 125 
    100  0   125  0           0.9
-        , testTarget False 5266  target_5266  sanction_list $ distribution 0   
    0    0   125  0           0.5
-        , testTarget False 49816 target_49816 sanction_list $ distribution 0   
    100  0   125  0           0.75
-        , testTarget False 43462 target_43462 sanction_list $ distribution 0   
    100  0   125  0           0.75
-        , testTarget False 43616 target_43616 sanction_list $ distribution 0   
    0    0   125  0           0.75
-        , testTarget False 43641 target_43641 sanction_list $ distribution 0   
    100  0   125  0           0.75
-        , testTarget False 43718 target_43718 sanction_list $ distribution 0   
    100  0   125  0           0.75
-        , testTarget False 43662 target_43662 sanction_list $ distribution 0   
    100  0   125  0           0.75
-        , testTarget False 43611 target_43611 sanction_list $ distribution 0   
    0    0   125  0           0.75
-        , testTarget False 29723 target_29723 sanction_list $ distribution 0   
    100  0   125  0           0.75
-        , testTarget False 38925 target_38925 sanction_list $ distribution 100 
    0    0   0    0           0.75
+       {- testTarget False SSID  target_SSID     sanction_list $ distribution 
ADDRESS DATE ID  NAME NATIONALITY CONFIDENCE
+                                                                 MAX_SCORE    
150     100  200 125  50          0.75       -}
+        [ testTarget False 5144  target_5144     sanction_list $ distribution 
125     100  0   125  0           0.9
+        , testTarget False 5266  target_5266     sanction_list $ distribution 
0       0    0   125  0           0.5
+        , testTarget False 49816 target_49816_v1 sanction_list $ distribution 
0       100  0   125  0           0.75
+        , testTarget False 49816 target_49816_v2 sanction_list $ distribution 
0       100  0   0    0           0.75
+        , testTarget False 49816 target_49816_v3 sanction_list $ distribution 
0       0    0   0    0           0.75
+        , testTarget False 49816 target_49816_v4 sanction_list $ distribution 
0       100  0   125  0           0.75
+        , testTarget False 43462 target_43462    sanction_list $ distribution 
0       100  0   125  0           0.75
+        , testTarget False 43616 target_43616    sanction_list $ distribution 
0       0    0   125  0           0.75
+        , testTarget False 43641 target_43641    sanction_list $ distribution 
0       100  0   125  0           0.75
+        , testTarget False 43718 target_43718    sanction_list $ distribution 
0       100  0   125  0           0.75
+        , testTarget False 43662 target_43662    sanction_list $ distribution 
0       100  0   125  0           0.75
+        , testTarget False 43611 target_43611    sanction_list $ distribution 
0       0    0   125  0           0.75
+        , testTarget False 29723 target_29723    sanction_list $ distribution 
0       100  0   125  0           0.75
+        , testTarget False 38925 target_38925_v1 sanction_list $ distribution 
100     0    0   0    0           0.75
+        , testTarget False 38925 target_38925_v2 sanction_list $ distribution 
0       0    0   125  0           0.75
+        , testTarget False 38925 target_38925_v3 sanction_list $ distribution 
0       100  0   0    0           0.75
+        , testTarget False 38925 target_38925_v4 sanction_list $ distribution 
100     0    0   0    0           0.75
+        , testTarget False 38925 target_38925_v5 sanction_list $ distribution 
100     100  0   0    0           0.75
+        , testTarget False 68815 target_68815    sanction_list $ distribution 
100     100  0   125  0           0.75
         ]
 
     , testGroup "Fake target with XML file"
diff --git a/test/Tests/Targets/Real.hs b/test/Tests/Targets/Real.hs
index b0e0da1..eaf97d1 100644
--- a/test/Tests/Targets/Real.hs
+++ b/test/Tests/Targets/Real.hs
@@ -3,7 +3,10 @@
 module Tests.Targets.Real
   ( target_5144
   , target_5266
-  , target_49816
+  , target_49816_v1
+  , target_49816_v2
+  , target_49816_v3
+  , target_49816_v4
   , target_43462
   , target_43616
   , target_43641
@@ -11,7 +14,12 @@ module Tests.Targets.Real
   , target_43662
   , target_43611
   , target_29723
-  , target_38925
+  , target_38925_v1
+  , target_38925_v2
+  , target_38925_v3
+  , target_38925_v4
+  , target_38925_v5
+  , target_68815
   ) where
 
 import Data.CountryCodes
@@ -78,8 +86,8 @@ target_5266 = NaturalPerson
                               }
   }
 
-target_49816 :: NaturalPerson
-target_49816 = NaturalPerson
+target_49816_v1 :: NaturalPerson
+target_49816_v1 = NaturalPerson
   { full_name   = "Vladimir Vladimirovich Putin"
   , last_name   = "Putin"
   , birthdate   = YearMonthDay 1952 10 07
@@ -98,6 +106,66 @@ target_49816 = NaturalPerson
                               }
   }
 
+target_49816_v2 :: NaturalPerson
+target_49816_v2 = NaturalPerson
+  { full_name   = "Vladimir Mouse"
+  , last_name   = "Mouse"
+  , birthdate   = YearMonthDay 1952 10 07
+  , nationality = RU
+  , national_id = "012345ABCDEF"
+  , residential = GLS.Address { GLS.country         = RU
+                              , street_name         = "Инжирный переулок"
+                              , street_number       = "1"
+                              , GLS.lines           = Nothing
+                              , building_name       = Just "Bocharov Ruchey"
+                              , building_number     = Nothing
+                              , zipcode             = "354008"
+                              , town_location       = Just "Sochi"
+                              , town_district       = Just "Town district of 
Sochi"
+                              , country_subdivision = Just "Krasnodar Krai"
+                              }
+  }
+
+target_49816_v3 :: NaturalPerson
+target_49816_v3 = NaturalPerson
+  { full_name   = "Mickey Mouse"
+  , last_name   = "Mouse"
+  , birthdate   = YearMonthDay 1951 04 12
+  , nationality = RU
+  , national_id = "012345ABCDEF"
+  , residential = GLS.Address { GLS.country         = RU
+                              , street_name         = "Инжирный переулок"
+                              , street_number       = "1"
+                              , GLS.lines           = Nothing
+                              , building_name       = Just "Bocharov Ruchey"
+                              , building_number     = Nothing
+                              , zipcode             = "354008"
+                              , town_location       = Just "Sochi"
+                              , town_district       = Just "Town district of 
Sochi"
+                              , country_subdivision = Just "Krasnodar Krai"
+                              }
+  }
+
+target_49816_v4 :: NaturalPerson
+target_49816_v4 = NaturalPerson
+  { full_name   = "Vladimir Vladimirovich Putin"
+  , last_name   = "Putin"
+  , birthdate   = YearMonthDay 1952 10 07
+  , nationality = FR
+  , national_id = "012345ABCDEF"
+  , residential = GLS.Address { GLS.country         = FR
+                              , street_name         = "Non existent"
+                              , street_number       = "Non existent"
+                              , GLS.lines           = Nothing
+                              , building_name       = Nothing
+                              , building_number     = Nothing
+                              , zipcode             = "Non existent"
+                              , town_location       = Nothing
+                              , town_district       = Nothing
+                              , country_subdivision = Nothing
+                              }
+  }
+
 target_43462 :: NaturalPerson
 target_43462 = NaturalPerson
   { full_name   = "Aleksandr Petrovich Barsukov"
@@ -238,8 +306,8 @@ target_29723 = NaturalPerson
                               }
   }
 
-target_38925 :: NaturalPerson
-target_38925 = NaturalPerson
+target_38925_v1 :: NaturalPerson
+target_38925_v1 = NaturalPerson
   { full_name   = "Solomon Grundy"
   , last_name   = "Grundy"
   , birthdate   = YearMonthDay 1800 06 06
@@ -257,3 +325,103 @@ target_38925 = NaturalPerson
                               , country_subdivision = Nothing
                               }
   }
+
+target_38925_v2 :: NaturalPerson
+target_38925_v2 = NaturalPerson
+  { full_name   = "Natalia Ivanovna Bezruchenko"
+  , last_name   = "Bezruchenko"
+  , birthdate   = YearMonthDay 1913 02 27
+  , nationality = BE
+  , national_id = "012345ABCDEF"
+  , residential = GLS.Address { GLS.country         = BE
+                              , street_name         = "Non existent"
+                              , street_number       = "Non existent"
+                              , GLS.lines           = Nothing
+                              , building_name       = Nothing
+                              , building_number     = Nothing
+                              , zipcode             = "Non existent"
+                              , town_location       = Nothing
+                              , town_district       = Nothing
+                              , country_subdivision = Nothing
+                              }
+  }
+
+target_38925_v3 :: NaturalPerson
+target_38925_v3 = NaturalPerson
+  { full_name   = "Mickey Bezruchenko"
+  , last_name   = "Bezruchenko"
+  , birthdate   = YearMonthDay 1979 08 22
+  , nationality = BE
+  , national_id = "012345ABCDEF"
+  , residential = GLS.Address { GLS.country         = BE
+                              , street_name         = "Non existent"
+                              , street_number       = "Non existent"
+                              , GLS.lines           = Nothing
+                              , building_name       = Nothing
+                              , building_number     = Nothing
+                              , zipcode             = "Non existent"
+                              , town_location       = Nothing
+                              , town_district       = Nothing
+                              , country_subdivision = Nothing
+                              }
+  }
+
+target_38925_v4 :: NaturalPerson
+target_38925_v4 = NaturalPerson
+  { full_name   = "Mickey Bezruchenko"
+  , last_name   = "Bezruchenko"
+  , birthdate   = YearMonthDay 1960 02 13
+  , nationality = BE
+  , national_id = "012345ABCDEF"
+  , residential = GLS.Address { GLS.country         = BE
+                              , street_name         = "Kryzhizhanovskogo str."
+                              , street_number       = "5A"
+                              , GLS.lines           = Nothing
+                              , building_name       = Nothing
+                              , building_number     = Just "64"
+                              , zipcode             = "Non existent"
+                              , town_location       = Just "Gresovskoe"
+                              , town_district       = Nothing
+                              , country_subdivision = Nothing
+                              }
+  }
+
+target_38925_v5 :: NaturalPerson
+target_38925_v5 = NaturalPerson
+  { full_name   = "Mickey Mouse"
+  , last_name   = "Mouse"
+  , birthdate   = YearMonthDay 1979 08 22
+  , nationality = RU
+  , national_id = "012345ABCDEF"
+  , residential = GLS.Address { GLS.country         = RU
+                              , street_name         = "Kryzhizhanovskogo str."
+                              , street_number       = "5A"
+                              , GLS.lines           = Nothing
+                              , building_name       = Nothing
+                              , building_number     = Just "64"
+                              , zipcode             = "Non existent"
+                              , town_location       = Just "Gresovskoe"
+                              , town_district       = Nothing
+                              , country_subdivision = Nothing
+                              }
+  }
+
+target_68815 :: NaturalPerson
+target_68815 = NaturalPerson
+  { full_name   = "Innocent Vitelhomme"
+  , last_name   = "Vitelhomme"
+  , birthdate   = YearMonthDay 1986 03 27
+  , nationality = HT
+  , national_id = "012345ABCDEF"
+  , residential = GLS.Address { GLS.country         = HT
+                              , street_name         = "Non existent"
+                              , street_number       = "Non existent"
+                              , GLS.lines           = Nothing
+                              , building_name       = Nothing
+                              , building_number     = Just "64"
+                              , zipcode             = "Non existent"
+                              , town_location       = Just "Tabarre"
+                              , town_district       = Nothing
+                              , country_subdivision = Nothing
+                              }
+  }
diff --git a/test/data/target_68815.xml b/test/data/target_68815.xml
new file mode 100644
index 0000000..dcb3bb1
--- /dev/null
+++ b/test/data/target_68815.xml
@@ -0,0 +1,31 @@
+<swiss-sanctions-list list-type="whole-list" date="2024-07-30"> 
+       <target ssid="68812">
+               <sanctions-set-id>27286</sanctions-set-id>
+               <individual>
+                       <identity ssid="68815" main="true">
+                               <name ssid="68819" name-type="primary-name" 
quality="good" lang="eng">
+                                       <name-part order="1" 
name-part-type="family-name">
+                                               <value>Vitelhomme</value>
+                                       </name-part>
+                                       <name-part order="2" 
name-part-type="given-name">
+                                               <value>Innocent</value>
+                                       </name-part>
+                               </name>
+                               <nationality ssid="68820">
+                                       <country iso-code="HT">Haiti</country>
+                               </nationality>
+                               <day-month-year ssid="68817" day="27" month="3" 
year="1986" calendar="Gregorian" quality="good"/>
+                               <place-of-birth ssid="68818" place-id="66660" 
quality="good"/>
+                               <address ssid="68816" place-id="66660" 
quality="good">
+                                       <address-details>64, Soisson, Tabarre 
49</address-details>
+                               </address>
+                       </identity>
+                       <other-information ssid="68813">Designation: Leader of 
Kraze Barye gang</other-information>
+                       <other-information ssid="68814">National identification 
no: Haiti 004-341-263-3</other-information>
+               </individual>
+       </target>
+       <place ssid="49815">
+               <location>Saint-Petersburg</location>
+               <country iso-code="RU">Russian Federation</country>
+       </place>
+</swiss-sanctions-list>

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]