Exemplo n.º 1
0
 def test_get_fields(self):
     """ Tests that get queue to_json gives us the expected fields """
     queue = self.get_basic_instance()
     queue.put()
     res = self.API().get(queue, self.user, None)
     data = res.to_json()
     keys =  ['count', 'graded', 'owner', 'assignment', 'id', 'submissions', 'remaining', 'assigned_staff']
     for key in keys:
         self.assertIn(key, data.keys())
Exemplo n.º 2
0
    def test_that_default_search_is_of_keys_and_not_values(self):
        data = self.api.get_sources(search="11") # 11 is a key, and not in the value

        self.assertIn("11", data.keys())
        self.assertEqual(len(data), 1)
Exemplo n.º 3
0
    def test_that_default_search_is_of_keys_and_not_values(self):
        data = self.api.get_sources(
            search="11")  # 11 is a key, and not in the value

        self.assertIn("11", data.keys())
        self.assertEqual(len(data), 1)