Angular2, testing and resolved data: How to test ngOnInit?

What is the behavior or the ngOnInit method? All it does is assign the value of the org when the route data is resolved. So that’s all you really need to test. let routeStub; beforeEach(() => { routeStub = { data: null } TestBed.configureTestingModule({ providers: [ { provide: ActivatedRoute, useValue: routeStub } ] }) }) … Read more

Python DNS module import error

I ran into the same issue with dnspython. My solution was to build the source from their official GitHub project. So my steps were: git clone https://github.com/rthalley/dnspython cd dnspython/ python setup.py install After doing this, I was able to import the dns module. EDIT It seems the pip install doesn’t work for this module. Install … Read more

What does the Resolver param in nginx do?

The nginx resolver directive is required because the system resolver blocks. Nginx is a multiplexing server (many connections in one OS process), so each call of system resolver will stop processing all connections till the resolver answer is received. That’s why Nginx implemented its own internal non-blocking resolver. If your config file has static DNS … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)