Ejemplo n.º 1
0
    def test_by_domain(self):
        domain = uuid.uuid4().hex
        config = _make_performance_config(domain)

        results = dbaccessors.by_domain(domain)
        self.assertEqual(1, len(results))
        self.assertEqual(config._id, results[0]._id)

        # check no results for some other domain
        no_results = dbaccessors.by_domain(uuid.uuid4().hex)
        self.assertEqual(0, len(no_results))
Ejemplo n.º 2
0
    def test_by_domain(self):
        domain = uuid.uuid4().hex
        config = _make_performance_config(domain)

        results = dbaccessors.by_domain(domain)
        self.assertEqual(1, len(results))
        self.assertEqual(config._id, results[0]._id)

        # check no results for some other domain
        no_results = dbaccessors.by_domain(uuid.uuid4().hex)
        self.assertEqual(0, len(no_results))
Ejemplo n.º 3
0
 def page_context(self):
     return {
         'performance_configs': dbaccessors.by_domain(self.domain),
     }
Ejemplo n.º 4
0
def list_performance_configs(request, domain):
    return render(request, "performance_sms/list_performance_configs.html", {
        'domain': domain,
        'performance_configs': dbaccessors.by_domain(domain)
    })
Ejemplo n.º 5
0
 def page_context(self):
     return {
         'performance_configs': dbaccessors.by_domain(self.domain),
     }