MDL-70584 core_iplookup: increase tolerance in test
authorMarina Glancy <marina@moodle.com>
Thu, 7 Jan 2021 13:12:59 +0000 (14:12 +0100)
committerMarina Glancy <marina@moodle.com>
Thu, 7 Jan 2021 13:12:59 +0000 (14:12 +0100)
iplookup/tests/geoplugin_test.php

index 491308e..e558939 100644 (file)
@@ -51,8 +51,8 @@ class core_iplookup_geoplugin_testcase extends advanced_testcase {
 
         $this->assertEquals('array', gettype($result));
         $this->assertEquals('San Francisco', $result['city']);
-        $this->assertEqualsWithDelta(-122.3933, $result['longitude'], 0.01, 'Coordinates are out of accepted tolerance');
-        $this->assertEqualsWithDelta(37.7697, $result['latitude'], 0.01, 'Coordinates are out of accepted tolerance');
+        $this->assertEqualsWithDelta(-122.3933, $result['longitude'], 0.1, 'Coordinates are out of accepted tolerance');
+        $this->assertEqualsWithDelta(37.7697, $result['latitude'], 0.1, 'Coordinates are out of accepted tolerance');
         $this->assertNull($result['error']);
         $this->assertEquals('array', gettype($result['title']));
         $this->assertEquals('San Francisco', $result['title'][0]);