def test_update_langnames_data(self):
     """
     After update_langnames_data() is called, there should be one JSONData object created called "langnames", which
     content has the expected attributes.
     """
     update_langnames_data()
     result = JSONData.objects.filter(name="langnames")
     json = result[0].data[0]
     self.assertEqual(len(result), 1)
     self.assertIn("pk", json)
     self.assertIn("lc", json)
     self.assertIn("ln", json)
     self.assertIn("ang", json)
     self.assertIn("alt", json)
     self.assertIn("lc", json)
     self.assertIn("lr", json)
     self.assertIn("gw", json)
     self.assertIn("ld", json)
 def test_update_langnames_data(self):
     """
     After update_langnames_data() is called, there should be one JSONData object created called "langnames", which
     content has the expected attributes.
     """
     update_langnames_data()
     result = JSONData.objects.filter(name="langnames")
     json = result[0].data[0]
     self.assertEqual(len(result), 1)
     self.assertIn("pk", json)
     self.assertIn("lc", json)
     self.assertIn("ln", json)
     self.assertIn("ang", json)
     self.assertIn("alt", json)
     self.assertIn("lc", json)
     self.assertIn("lr", json)
     self.assertIn("gw", json)
     self.assertIn("ld", json)
     self.assertIn("hc", json)
Esempio n. 3
0
 def handle(self, *args, **options):
     update_langnames_data()