Exemple #1
0
def get_backend(name):
    if name == "test":
        backend = TestBackend()
    else:
        backend = DjangoBackend()

    return backend
Exemple #2
0
    def setUp(self):
        self.backend = DjangoBackend()

        self.expected_ciprofloxacin_results = \
            {"formulation":"ciprofloxacin 500mg tablet",
             "country": "Democratic Republic of Congo",
             "msh_price": Decimal("0.033000"),
             "fob_price": Decimal("0.000003"),
             "landed_price": Decimal("0.000004"),
             "fob_currency": 'EUR',
             "period": 2009,
             "issue_unit":100,
             "landed_currency": 'EUR',
             'incoterm':"CIF"}

        self.ciprofloxacin = self.set_up_and_return_drc_ciprofloxacin(
            fob_price=Decimal("0.000003"), landed_price=Decimal("0.000004"))
        self.expected_ciprofloxacin_results['url'] = reverse(
            'formulation-by-id', args=[self.ciprofloxacin.id, ""])

        self.biofloxx = self.set_up_and_return_biofloxx(self.ciprofloxacin)