Complete test coverage db.models.base.refresh_from_db
diff --git a/tests/basic/tests.py b/tests/basic/tests.py
index 342c39ea3403e..b3bb4d02cc6c6 100644
--- a/tests/basic/tests.py
+++ b/tests/basic/tests.py
@@ -649,6 +649,12 @@ def test_unknown_kwarg(self):
         with self.assertRaisesMessage(TypeError, msg):
             s.refresh_from_db(unknown_kwarg=10)
 
+    def test_lookup_in_fields(self):
+        s = SelfRef.objects.create()
+        msg = 'Found "__" in fields argument. Relations and transforms are not allowed in fields.'
+        with self.assertRaisesMessage(ValueError, msg):
+            s.refresh_from_db(fields=['foo__bar'])
+
     def test_refresh_fk(self):
         s1 = SelfRef.objects.create()
         s2 = SelfRef.objects.create()

Try to cover
https://github.com/django/django/blob/e1fc07c047f8e46c2cea0120f44011fc458f1e91/django/db/models/base.py#L595